mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-07-17 12:01:51 +08:00
[offers][fix] fix redirection for non logged in users (#556)
This commit is contained in:
@@ -135,11 +135,7 @@ export default function AppShell({ children }: Props) {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { data: session } = useSession();
|
const { data: session } = useSession();
|
||||||
const { isLoading: isOffersAdminResultsLoading, data: isOffersAdmin } =
|
const { isLoading: isOffersAdminResultsLoading, data: isOffersAdmin } =
|
||||||
trpc.useQuery(['offers.admin.isAdmin'], {
|
trpc.useQuery(['offers.admin.isAdmin']);
|
||||||
onError: () => {
|
|
||||||
router.push('/offers');
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const currentProductNavigation: Readonly<{
|
const currentProductNavigation: Readonly<{
|
||||||
googleAnalyticsMeasurementID: string;
|
googleAnalyticsMeasurementID: string;
|
||||||
logo?: React.ReactNode;
|
logo?: React.ReactNode;
|
||||||
|
|||||||
Reference in New Issue
Block a user