Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

546 B
Raw Blame
import { cache } from "react";

import { createRscTrpcContext } from "./rsc-context";
import { boardRouter } from "./router/board";

const createBoardCallerAsync = async () => boardRouter.createCaller(await createRscTrpcContext());

export const getBoardByNameAsync = cache(async (name: string) => {
  const caller = await createBoardCallerAsync();
  return await caller.getBoardByName({ name });
});

export const getHomeBoardAsync = cache(async () => {
  const caller = await createBoardCallerAsync();
  return await caller.getHomeBoard();
});