responsive navbar
This commit is contained in:
@@ -3,15 +3,18 @@ import { trpc } from "~/app/_trpc/Client"
|
||||
import CvEntry, { type CvEntryProps } from "./CvEntry"
|
||||
import type { servTrpc } from "~/app/_trpc/ServerClient"
|
||||
type CvCategoryProps = {
|
||||
initialData: Awaited<ReturnType<typeof servTrpc.cvCategory.get>>,
|
||||
initialData: Awaited<ReturnType<typeof servTrpc.cv.category.list>>,
|
||||
children?: React.ReactElement<CvEntryProps>
|
||||
}
|
||||
export default function CvCategory(props:CvCategoryProps) {
|
||||
const cvCategories = trpc.cvCategory.get.useQuery(undefined,{
|
||||
const cvCategories = trpc.cv.category.list.useQuery(undefined,{
|
||||
initialData: props.initialData,
|
||||
refetchOnMount: false,
|
||||
refetchOnReconnect: false,
|
||||
// refetchOnMount: false,
|
||||
// refetchOnReconnect: false,
|
||||
});
|
||||
if (cvCategories.isPending) {
|
||||
return (<div> Loading ... </div>);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
{cvCategories.data.map((cat) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { servTrpc } from "~/app/_trpc/ServerClient"
|
||||
import CvCategory from "./_components/CvCategory";
|
||||
export default async function CvPage() {
|
||||
const cvCategories = await servTrpc.cvCategory.get();
|
||||
const cvCategories = await servTrpc.cv.category.list();
|
||||
return (
|
||||
<CvCategory initialData={cvCategories}>
|
||||
<></>
|
||||
|
||||
Reference in New Issue
Block a user