🐛 Fix welcome page to show logged-in user (#1218)

This commit is contained in:
Tomer Barletz 2024-06-02 01:31:03 +03:00 committed by GitHub
parent bd8b50308c
commit 0eb5e18d85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,17 +1,14 @@
import { Box, Container, Text } from "@chakra-ui/react"
import { useQueryClient } from "@tanstack/react-query"
import { createFileRoute } from "@tanstack/react-router"
import type { UserPublic } from "../../client"
import useAuth from "../../hooks/useAuth"
export const Route = createFileRoute("/_layout/")({
component: Dashboard,
})
function Dashboard() {
const queryClient = useQueryClient()
const currentUser = queryClient.getQueryData<UserPublic>(["currentUser"])
const { user: currentUser } = useAuth()
return (
<>