mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-05 20:21:50 +02:00
♻️ Avoid getServerSideProps for login/register (#755)
This commit is contained in:
parent
becc7a7930
commit
438c4ec35b
12 changed files with 98 additions and 197 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue