diff --git a/apps/dashboard/pages/sponsor-booth/index.tsx b/apps/dashboard/pages/sponsor-booth/index.tsx index 979b4700..07dce059 100644 --- a/apps/dashboard/pages/sponsor-booth/index.tsx +++ b/apps/dashboard/pages/sponsor-booth/index.tsx @@ -87,8 +87,8 @@ const Index = () => { if (user == null) { return <>Loading; } - // Limit access to only sponsor role - if (user?.role !== HibiscusRole.SPONSOR) { + // Limit access to only sponsor or admin role + if (![HibiscusRole.SPONSOR, HibiscusRole.ADMIN].includes(user?.role)) { router.push('/'); return <>; } diff --git a/apps/podium/pages/index.tsx b/apps/podium/pages/index.tsx index dac07a0b..ae5fa0dd 100644 --- a/apps/podium/pages/index.tsx +++ b/apps/podium/pages/index.tsx @@ -101,8 +101,9 @@ const Index = () => { }, [isSearchOpen]); const handleSearch = () => { - let searchQuery = (document.getElementById('searchbox') as HTMLInputElement) - .value; + const searchQuery = ( + document.getElementById('searchbox') as HTMLInputElement + ).value; setSearchInput(searchQuery); }; @@ -311,7 +312,7 @@ const Index = () => { return <>; } - if (user?.role !== HibiscusRole.JUDGE) { + if (![HibiscusRole.JUDGE, HibiscusRole.ADMIN].includes(user?.role)) { window.location.assign(env.Hibiscus.AppURL.portal); return <>; }