We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dbab0b commit 2b28db7Copy full SHA for 2b28db7
frontend/src/routes/_layout/index.tsx
@@ -1,17 +1,14 @@
1
import { Box, Container, Text } from "@chakra-ui/react"
2
-import { useQueryClient } from "@tanstack/react-query"
3
import { createFileRoute } from "@tanstack/react-router"
4
5
-import type { UserPublic } from "../../client"
+import useAuth from "../../hooks/useAuth"
6
7
export const Route = createFileRoute("/_layout/")({
8
component: Dashboard,
9
})
10
11
function Dashboard() {
12
- const queryClient = useQueryClient()
13
-
14
- const currentUser = queryClient.getQueryData<UserPublic>(["currentUser"])
+ const { user: currentUser } = useAuth()
15
16
return (
17
<>
0 commit comments