From cdfbabbe149f5aecb30709a16eb2faf905f7aba8 Mon Sep 17 00:00:00 2001 From: Zhang Ziqing <69516975+ziqing26@users.noreply.github.com> Date: Fri, 18 Nov 2022 20:31:07 +0800 Subject: [PATCH] [offers][fix] fix redirection for non logged in users (#556) --- apps/portal/src/components/global/AppShell.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/portal/src/components/global/AppShell.tsx b/apps/portal/src/components/global/AppShell.tsx index 7745efcc..e6f23e7a 100644 --- a/apps/portal/src/components/global/AppShell.tsx +++ b/apps/portal/src/components/global/AppShell.tsx @@ -135,11 +135,7 @@ export default function AppShell({ children }: Props) { const router = useRouter(); const { data: session } = useSession(); const { isLoading: isOffersAdminResultsLoading, data: isOffersAdmin } = - trpc.useQuery(['offers.admin.isAdmin'], { - onError: () => { - router.push('/offers'); - }, - }); + trpc.useQuery(['offers.admin.isAdmin']); const currentProductNavigation: Readonly<{ googleAnalyticsMeasurementID: string; logo?: React.ReactNode;