Skip to content

Commit cdfbabb

Browse files
authored
[offers][fix] fix redirection for non logged in users (#556)
1 parent 3e91ff2 commit cdfbabb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

apps/portal/src/components/global/AppShell.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,7 @@ export default function AppShell({ children }: Props) {
135135
const router = useRouter();
136136
const { data: session } = useSession();
137137
const { isLoading: isOffersAdminResultsLoading, data: isOffersAdmin } =
138-
trpc.useQuery(['offers.admin.isAdmin'], {
139-
onError: () => {
140-
router.push('/offers');
141-
},
142-
});
138+
trpc.useQuery(['offers.admin.isAdmin']);
143139
const currentProductNavigation: Readonly<{
144140
googleAnalyticsMeasurementID: string;
145141
logo?: React.ReactNode;

0 commit comments

Comments
 (0)