Skip to content

Commit

Permalink
Merge pull request #666 from nwplus/dev
Browse files Browse the repository at this point in the history
hide links if portal not live
  • Loading branch information
DonaldKLee authored Jan 3, 2025
2 parents 85eaf24 + 0b8cc04 commit 819c1a4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/ApplicationDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ export const hackerStatuses = (relevantDates, hackerName = null, activeHackathon
blurb: `Congratulations! We loved the passion and drive we saw in your application, and we'd love even more for you to join us at ${copyText[activeHackathon]?.hackathonName} over the weekend of ${relevantDates?.hackathonWeekend}! Please RSVP before ${relevantDates?.rsvpBy} to confirm your spot.`,
},
acceptedAndAttending: {
sidebarText: "RSVP'd!",
cardText: (
<>
Accepted &amp; RSVP'd{' '}
Expand Down
1 change: 1 addition & 0 deletions src/components/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const Page = ({ hackerStatus, children }) => {
isJudgingReleased={livesiteDoc.judgingReleased[activeHackathon]}
isSubmissionsOpen={livesiteDoc.submissionsOpen[activeHackathon]}
isApplicationOpen={livesiteDoc.applicationsOpen[activeHackathon]}
isPortalLive={livesiteDoc.portalLive[activeHackathon]}
showMobileSidebar={showMobileSidebar}
hideSidebarCallback={() => setShowMobileSidebar(false)}
hackerStatus={hackerStatus}
Expand Down
3 changes: 2 additions & 1 deletion src/components/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ const Sidebar = ({
isJudgingReleased,
isSubmissionsOpen,
isApplicationOpen,
isPortalLive,
hideSidebarCallback,
hackerStatus,
}) => {
Expand Down Expand Up @@ -291,7 +292,7 @@ const Sidebar = ({
{/* <SponsorIcon src={poweredBy} alt="powered by Livepeer" /> */}
</LogoContainer>
<ItemsContainer>
{!hackerStatus || hackerStatus === 'acceptedAndAttending' ? (
{!hackerStatus || (hackerStatus === 'acceptedAndAttending' && isPortalLive) ? (
<>
{Object.entries(links).map((t, k) => {
return (
Expand Down
5 changes: 5 additions & 0 deletions src/containers/Application/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { uploadWaiverToStorage, useHackerApplication } from '../../utility/Hacke
import { MAX_WAIVER_FILE_SIZE_MB } from '../../utility/Validation'
import { currentHackathonRef, getLivesiteDoc, livesiteDocRef } from '../../utility/firebase'
import { useHackathon } from '../../utility/HackathonProvider'
import Loading from '../../components/Loading'

const ApplicationDashboardContainer = () => {
const { activeHackathon, dbHackathonName } = useHackathon()
Expand Down Expand Up @@ -49,6 +50,10 @@ const ApplicationDashboardContainer = () => {
return unsubscribe
}, [activeHackathon])

if (!application) {
return <Loading />
}

const { applicationStatus, responded, attending } = application.status
let hackerStatus

Expand Down

0 comments on commit 819c1a4

Please sign in to comment.