13 lines
310 B
TypeScript
Raw Permalink Normal View History

2024-02-22 20:59:20 +00:00
import { PageContext } from "vike/types";
import trpcServer from "~/server/api/trpc/trpc";
2024-02-22 12:14:58 +00:00
2024-02-22 20:59:20 +00:00
export const data = async (ctx: PageContext) => {
const trpc = await trpcServer(ctx);
const projects = await trpc.project.getAll();
return { projects };
2024-02-22 12:14:58 +00:00
};
export type Data = Awaited<ReturnType<typeof data>>;