fix(BOOK-325): Added refetch options to user.name query and refactored header

Approved-by: Linus Flood
Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-11-13 06:33:47 +00:00
parent 3a45e6cfe3
commit c4b564998c
27 changed files with 395 additions and 347 deletions

View File

@@ -28,7 +28,13 @@ export default function MyPagesMenuWrapper() {
const { data: session } = useSession()
const isUserLoggedIn = isValidSession(session)
const { data: user, isLoading: isLoadingUser } = trpc.user.name.useQuery()
const { data: user, isLoading: isLoadingUser } = trpc.user.name.useQuery(
undefined,
{
refetchOnWindowFocus: true,
refetchInterval: 300_000,
}
)
const { data: membership, isLoading: isLoadingMembership } =
trpc.user.safeMembershipLevel.useQuery()