Complete Loading Data and Index Route. HydrateFallback skipped BUT POSSIBLE.

This commit is contained in:
2025-04-15 21:19:15 +02:00
parent bfdceb73ec
commit 9657f731ab
4 changed files with 34 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
import { publicProcedure, router } from '~/server/trpc/init';
import { z } from 'zod';
import { getContacts } from "~/server/utils/data";
export const appRouter = router({
hello: publicProcedure.input(
@@ -11,6 +12,9 @@ export const appRouter = router({
greeting: `hello ${opts.input.text}`,
};
}),
contactList: publicProcedure.query(async () => {
return await getContacts();
})
});
// export type definition of API