Initial commit
This commit is contained in:
15
packages/navigation/src/ui/hooks/use-header.ts
Normal file
15
packages/navigation/src/ui/hooks/use-header.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import { useSuspenseQuery } from "@tanstack/react-query";
|
||||
import { useTRPC } from "@repo/core-trpc";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export function useHeader() {
|
||||
const trpc = useTRPC();
|
||||
return useSuspenseQuery(trpc.navigation.header.queryOptions({})) as {
|
||||
data: {
|
||||
items: { label: string; href: string; external: boolean }[];
|
||||
logoId?: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user