Skip to content

Commit

Permalink
Merge pull request #643 from nwplus/admin-applications
Browse files Browse the repository at this point in the history
Allow admins to view application pages anytime
  • Loading branch information
DonaldKLee authored Nov 14, 2024
2 parents dc0c897 + a412e7f commit 28f1b3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/HackathonSelection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import nwplus_icon from '../assets/nwplus_icon.svg'
import HackathonCard from '../components/HackathonCard'

// one of 'HackCamp', 'nwHacks', 'cmd-f', or null (when we're done for the year)
const UP_NEXT_HACKATHON_NAME = 'HackCamp'
const UP_NEXT_HACKATHON_NAME = 'nwHacks'

const HackathonSelectionContainer = styled.div`
display: flex;
Expand Down
4 changes: 3 additions & 1 deletion src/utility/HackerApplicationContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ export function HackerApplicationProvider({ children }) {
return null
}

if (!applicationOpen && !window.location.pathname.endsWith('/application')) {
const canViewApplication =
applicationOpen || window.location.pathname.endsWith('/application') || user?.admin
if (!canViewApplication) {
return <Closed />
}

Expand Down

0 comments on commit 28f1b3b

Please sign in to comment.