♻️ Avoid getServerSideProps for login/register (#755)

This commit is contained in:
Luke Vella 2023-07-14 18:09:14 +01:00 committed by GitHub
parent becc7a7930
commit 438c4ec35b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 98 additions and 197 deletions

View file

@ -3,6 +3,7 @@ import { useTranslation } from "next-i18next";
import React from "react";
import { PostHogProvider } from "@/contexts/posthog";
import { useWhoAmI } from "@/contexts/whoami";
import { useRequiredContext } from "./use-required-context";
@ -48,7 +49,7 @@ export const UserProvider = (props: { children?: React.ReactNode }) => {
const queryClient = trpc.useContext();
const { data: user } = trpc.whoami.get.useQuery();
const user = useWhoAmI();
const billingQuery = trpc.user.getBilling.useQuery();
const { data: userPreferences } = trpc.userPreferences.get.useQuery();