trpc demo
This commit is contained in:
@@ -1,18 +1,10 @@
|
||||
import { getCvCategories } from "~/server/db/query"
|
||||
|
||||
import { servTrpc } from "~/app/_trpc/ServerClient"
|
||||
import CvCategory from "./_components/CvCategory";
|
||||
export default async function CvPage() {
|
||||
const cvCategories = await getCvCategories();
|
||||
const cvCategories = await servTrpc.cvCategory.get();
|
||||
return (
|
||||
<div>
|
||||
{cvCategories.map((category) => {
|
||||
return (
|
||||
<div key={category.id}>
|
||||
<div>
|
||||
{category.name}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
<CvCategory initialData={cvCategories}>
|
||||
<></>
|
||||
</CvCategory>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user