Skip to content

Commit

Permalink
🐛 Fix welcome page to show logged-in user (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomerb authored Jun 1, 2024
1 parent bd8b503 commit 0eb5e18
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions frontend/src/routes/_layout/index.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<>
Expand Down

0 comments on commit 0eb5e18

Please sign in to comment.