Skip to content

Commit

Permalink
yay
Browse files Browse the repository at this point in the history
  • Loading branch information
martincai8 committed Oct 19, 2024
1 parent 41853f1 commit 48f1161
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Binary file added src/assets/hc_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import QrCode from '../components/QrCode'
import { useAuth } from '../utility/Auth'
// import Hackcamp2023BG from '../components/BackgroundImage'
import { APPLICATION_STATUS } from '../utility/Constants'
import backgroundImage from '../assets/cmdf_homebg.svg'
import backgroundImage from '../assets/hc_background.png'
import mobileBackgroundImage from '../assets/cmdf_mobilebg.svg'
import { copyText } from '../utility/Constants'
import { useHackathon } from '../utility/HackathonProvider'
import { css } from 'styled-components'

//My Ticket
const HomeContainer = styled.div`
Expand All @@ -38,12 +39,12 @@ const HomeContainerBackground = styled.div`
${props =>
props.backgroundImage &&
css`
background-image: url(${backgroundImage});
background-image: url(${props.backgroundImage});
background-size: cover;
background-position: right bottom;
${p => p.theme.mediaQueries.mobile} {
background-image: url(${mobileBackgroundImage});
background-image: none;
background-size: cover;
background-position: center;
}
Expand All @@ -68,7 +69,7 @@ export default withTheme(({ announcements, theme }) => {

return (
<>
<HomeContainerBackground />
<HomeContainerBackground backgroundImage={backgroundImage} />
<HomeContainer>
{/* {activeHackathon === 'hackcamp' && <Hackcamp2023BG />} */}
<HackerCountdown />
Expand Down
2 changes: 1 addition & 1 deletion src/utility/Auth.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const getRedirectUrl = (redirect, activeHackathon) => {
case REDIRECT_STATUS.ApplicationNotSubmitted:
return `/app/${activeHackathon}/application/part-0`
case REDIRECT_STATUS.ApplicationSubmitted:
return `/app/${activeHackathon}`
return `/app/${activeHackathon}/application`
default:
return `/app/${activeHackathon}/application`
}
Expand Down
3 changes: 2 additions & 1 deletion src/utility/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ const NestedRoutes = props => {
const hackathonFromURL = props.base.split('/')[2].toLowerCase()

useEffect(() => {
if (VALID_HACKATHONS.includes(hackathonFromURL) && hackathonFromURL !== activeHackathon) {
if (VALID_HACKATHONS.includes(hackathonFromURL)) {
setActiveHackathon(hackathonFromURL)
localStorage.setItem('activeHackathon', activeHackathon)
}
}, [props.base, activeHackathon, setActiveHackathon])

Expand Down

0 comments on commit 48f1161

Please sign in to comment.