diff --git a/apps/portal/src/components/global/AppShell.tsx b/apps/portal/src/components/global/AppShell.tsx index 20bd1b53..7745efcc 100644 --- a/apps/portal/src/components/global/AppShell.tsx +++ b/apps/portal/src/components/global/AppShell.tsx @@ -157,9 +157,10 @@ export default function AppShell({ children }: Props) { if (session == null) { return OffersNavigation; } - return !isOffersAdminResultsLoading && isOffersAdmin - ? OffersNavigationAdmin - : OffersNavigationAuthenticated; + if (!isOffersAdminResultsLoading && isOffersAdmin) { + return OffersNavigationAdmin; + } + return OffersNavigationAuthenticated; } if (path.startsWith('/questions')) { diff --git a/apps/portal/src/pages/offers/admin.tsx b/apps/portal/src/pages/offers/admin.tsx index 5fc77224..2b6eca52 100644 --- a/apps/portal/src/pages/offers/admin.tsx +++ b/apps/portal/src/pages/offers/admin.tsx @@ -4,7 +4,7 @@ import Link from 'next/link'; import { useRouter } from 'next/router'; import { useState } from 'react'; import { MapPinIcon } from '@heroicons/react/24/outline'; -import { Banner } from '@tih/ui'; +import { Banner, Spinner } from '@tih/ui'; import { useGoogleAnalytics } from '~/components/global/GoogleAnalytics'; import OffersTable from '~/components/offers/admin/OffersTable'; @@ -52,127 +52,129 @@ export default function OffersHomePage({ if (!isLoading && !isAuthorized) { router.push('/offers'); } - return ( - isAuthorized && ( - <> -
-