mirror of
https://github.com/khairul169/code-share.git
synced 2025-04-29 00:59:37 +07:00
13 lines
310 B
TypeScript
13 lines
310 B
TypeScript
import { PageContext } from "vike/types";
|
|
import trpcServer from "~/server/api/trpc/trpc";
|
|
|
|
export const data = async (ctx: PageContext) => {
|
|
const trpc = await trpcServer(ctx);
|
|
|
|
const projects = await trpc.project.getAll();
|
|
|
|
return { projects };
|
|
};
|
|
|
|
export type Data = Awaited<ReturnType<typeof data>>;
|