From 9147155c26c3bd771d7c713140202a0f771322eb Mon Sep 17 00:00:00 2001 From: samtuhseng Date: Sat, 13 Jan 2024 20:32:03 -0800 Subject: [PATCH 1/2] remove console log --- src/components/QrCode.js | 1 - src/components/Schedule/Event.js | 6 +----- src/components/Schedule/Schedule.js | 4 ---- src/components/Schedule/Timeline.js | 5 ----- src/containers/Schedule.js | 3 --- 5 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/components/QrCode.js b/src/components/QrCode.js index eb21fe4d..88cc8697 100644 --- a/src/components/QrCode.js +++ b/src/components/QrCode.js @@ -150,7 +150,6 @@ const QrCode = ({ userInfo, userId }) => { const userId = userInfo.uid const name = userInfo.displayName const email = userInfo.email - console.log(userId, name, email) const url = `https://us-central1-wallet-cloud-func.cloudfunctions.net/getAppleWalletPass?userId=${userId}&name=${name}&email=${email}` window.location.href = url } diff --git a/src/components/Schedule/Event.js b/src/components/Schedule/Event.js index d0ab7b21..5d744245 100644 --- a/src/components/Schedule/Event.js +++ b/src/components/Schedule/Event.js @@ -130,11 +130,7 @@ export default ({ event }) => { setMaxHeight(descriptionRef.current.scrollHeight) } } - console.log('Formatted Start Time:', formatTime(event.startTime)) - console.log('Original Start Time:', event.startTime) - console.log('Calculated MarginLeft:', event.timeStart * HOUR_WIDTH) - console.log('ORIGINAL duration:', event.duration) - console.log('Calculated duration:', event.duration * HOUR_WIDTH) + return ( { } export default ({ events, hackathonStart, hackathonEnd }) => { - console.log('hackathonStart prop in Schedule:', hackathonStart) - console.log('hackathonEnd prop in Schedule:', hackathonEnd) // track mobile view const [windowWidth, setWindowWidth] = useState(window.innerWidth) useEffect(() => { @@ -293,8 +291,6 @@ export default ({ events, hackathonStart, hackathonEnd }) => { const mobileSchedule = produceOptimalScheduleMobile(events) const schedule = produceOptimalScheduleDesktop(events) - console.log('mobile Events:', mobileSchedule) - console.log('Scheduled Events:', schedule) const durationOfHackathon = Math.min(msToHours(hackathonEnd - hackathonStart), 48) // track scroll position for timeline label fade (!isMobile) diff --git a/src/components/Schedule/Timeline.js b/src/components/Schedule/Timeline.js index fd7a25b5..9a2d4b67 100644 --- a/src/components/Schedule/Timeline.js +++ b/src/components/Schedule/Timeline.js @@ -124,7 +124,6 @@ const CurrentTime = ({ start, duration, numCols }) => { } } }, [scrolled, hoursBetweenNowAndStart]) - console.log(hoursBetweenNowAndStart) return ( renderCurrentTime && ( @@ -172,15 +171,11 @@ export const TimelineColumn = ({ block => block.hourBlock.getTime() === hourStartTime.getTime() ) - console.log(hourBlock) - // Calculate the height based on the number of events const blockHeight = hourBlock ? MOBILE_HOUR_HEIGHT * hourBlock.eventCount : MOBILE_HOUR_HEIGHT - console.log(blockHeight) // correct - const labelTime = new Date(hackathonStart.getTime() + i * 60 * 60 * 1000) const label = labelTime.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit' }) return ( diff --git a/src/containers/Schedule.js b/src/containers/Schedule.js index 2fdab56d..49c5e097 100644 --- a/src/containers/Schedule.js +++ b/src/containers/Schedule.js @@ -17,8 +17,6 @@ export default () => { // setEnd(new Date(d.hackathonEnd)) const start = new Date(d.hackathonStart) const end = new Date(d.hackathonEnd) - console.log('Hackathon Start:', start) - console.log('Hackathon End:', end) setStart(start) setEnd(end) } @@ -34,7 +32,6 @@ export default () => { .orderBy('startTime', 'asc') .onSnapshot(querySnapshot => { const events = Object.values(querySnapshot.docs.map(doc => doc.data())) - console.log('Events:', events) setEvents(events) }) // .onSnapshot(querySnapshot => { From 635a6001aebca7e3c4514d4b56e14cf75b219dce Mon Sep 17 00:00:00 2001 From: DonaldKLee Date: Sat, 13 Jan 2024 20:36:25 -0800 Subject: [PATCH 2/2] only see links if accepted --- src/components/Sidebar.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/components/Sidebar.js b/src/components/Sidebar.js index 54b99a85..6a28e1b2 100644 --- a/src/components/Sidebar.js +++ b/src/components/Sidebar.js @@ -10,6 +10,7 @@ import { getSponsors } from '../utility/firebase' import { hackerStatuses } from './ApplicationDashboard' import { Button } from './Input/index' import { A } from './Typography' +import { APPLICATION_STATUS } from '../utility/Constants' /* Old styles border-right: 1px solid ${p => p.theme.colors.border}; @@ -320,14 +321,18 @@ export default ({ )} - - Useful Links - {links.useful_links.map((v, i) => ( - - {v.text} - - ))} - + {user?.status === APPLICATION_STATUS.accepted && isAuthed && user.uid ? ( + + Useful Links + {links.useful_links.map((v, i) => ( + + {v.text} + + ))} + + ) : ( + <> + )} {isAuthed ? (