mirror of
https://github.com/khairul169/code-share.git
synced 2025-04-29 09:09:35 +07:00
12 lines
313 B
TypeScript
12 lines
313 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 presets = await trpc.project.getTemplates();
|
|
|
|
return { presets };
|
|
};
|
|
|
|
export type Data = Awaited<ReturnType<typeof data>>;
|