Skip to content

Commit

Permalink
Fix unauthorized showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy-Gonzalez committed Feb 25, 2025
1 parent 7d2ca7c commit e10a41b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/sponsors/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,18 @@ export default function Sponsors() {
refresh()
}, [isAdmin])

if (roles.length === 0 || loading) {
if (roles.length === 0) {
return <Loading />
}

if (!isAdmin) {
return <Unauthorized />
}

if (loading) {
return <Loading />
}

async function createSponsor() {
const email = prompt("Enter email:")
if (!email) {
Expand Down

0 comments on commit e10a41b

Please sign in to comment.