Skip to content

Commit

Permalink
Merge pull request #560 from nwplus/portal-ui-changes
Browse files Browse the repository at this point in the history
remove console log + now can only access useful links if accepted
  • Loading branch information
meleongg authored Jan 14, 2024
2 parents 169aad6 + d09d5a1 commit 367c638
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 26 deletions.
1 change: 0 additions & 1 deletion src/components/QrCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 1 addition & 5 deletions src/components/Schedule/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<EventCard
timeStart={event.timeStart}
Expand Down
4 changes: 0 additions & 4 deletions src/components/Schedule/Schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ const MobileScheduleColumn = ({ column, hackathonStart, cumulativeHeight }) => {
}

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(() => {
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions src/components/Schedule/Timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ const CurrentTime = ({ start, duration, numCols }) => {
}
}
}, [scrolled, hoursBetweenNowAndStart])
console.log(hoursBetweenNowAndStart)
return (
renderCurrentTime && (
<CurrentTimeHR hourOffset={hoursBetweenNowAndStart} widthMultiplier={numCols} />
Expand Down Expand Up @@ -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 (
Expand Down
21 changes: 13 additions & 8 deletions src/components/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -320,14 +321,18 @@ export default ({
)}
</ItemsContainer>

<ItemsContainer>
<CategoryHeader>Useful Links</CategoryHeader>
{links.useful_links.map((v, i) => (
<ExternalLink key={i} href={v.location} target="_blank" rel="noopener noreferrer">
<StyledA>{v.text}</StyledA>
</ExternalLink>
))}
</ItemsContainer>
{user?.status === APPLICATION_STATUS.accepted && isAuthed && user.uid ? (
<ItemsContainer>
<CategoryHeader>Useful Links</CategoryHeader>
{links.useful_links.map((v, i) => (
<ExternalLink key={i} href={v.location} target="_blank" rel="noopener noreferrer">
<StyledA>{v.text}</StyledA>
</ExternalLink>
))}
</ItemsContainer>
) : (
<></>
)}

{isAuthed ? (
<StyledButton color="secondary" onClick={logout}>
Expand Down
3 changes: 0 additions & 3 deletions src/containers/Schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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 => {
Expand Down

0 comments on commit 367c638

Please sign in to comment.