[offers][fix] fix redirection for non logged in users (#556)

pull/557/head
Zhang Ziqing 2 years ago committed by GitHub
parent 3e91ff2d6a
commit cdfbabbe14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;

Loading…
Cancel
Save