Skip to content

Commit

Permalink
resolved merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylin-chung committed Mar 10, 2024
2 parents 43a4a91 + f5d2ac4 commit 6c59760
Show file tree
Hide file tree
Showing 20 changed files with 461 additions and 168 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
!.huskyrc.js
public
2 changes: 1 addition & 1 deletion .huskyrc.js → .huskryrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ module.exports = {
'pre-commit': 'yarn lint',
'pre-push': 'yarn lint'
}
};
};
31 changes: 31 additions & 0 deletions .husky/_/husky.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
if [ -z "$husky_skip_init" ]; then
debug () {
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}

readonly hook_name="$(basename "$0")"
debug "starting $hook_name..."

if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi

if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi

export readonly husky_skip_init=1
sh -e "$0" "$@"
exitCode="$?"

if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
fi

exit $exitCode
fi
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
16 changes: 16 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint

echo "> ACM Hack Pre-push Hook: Checking branch name for push to main. \n"

BRANCH=`git rev-parse --abbrev-ref HEAD`
PROTECTED_BRANCHES="^(main|master)"

if [[ "$BRANCH" =~ $PROTECTED_BRANCHES ]]
then
echo "ERROR: Oops! You tried pushing directly to $BRANCH. Please create your own branch with \n git checkout -b <your_name/feature_name> \nand push again to create a pull request. Note: The < > is inserted for convention as a variable placeholder. Do not include < > in your actual branch name.\n" && exit 1
fi

exit 0
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1",
"lint": "eslint --ext js,jsx ."
},
"husky": {
"hooks": {
"pre-commit": "./.husky/pre-commit",
"pre-push": "./.husky/pre-push"
}
},
"repository": {
"type": "git",
"url": "https://github.com/uclaacm/hoth.uclaacm.com"
Expand Down
8 changes: 4 additions & 4 deletions src/components/HomePage/Banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const useStyles = makeStyles(theme => ({
text: {
color: 'white',
fontWeight: 400,
textAlign: 'left',
textAlign: 'right',
justifyItems: 'left',
[theme.breakpoints.down('sm')]: {
textAlign: 'center'
Expand Down Expand Up @@ -210,7 +210,7 @@ function Banner() {
</NoSsr>

<Typography variant='h5' className={classes.text} component='h3'
style={{ fontWeight: 500, marginTop: 10 }}><b>Location:</b> The Hill, room TBD
style={{ fontWeight: 500, marginTop: 10 }}><b>Location:</b> Carnesale Commons, Palisades Room
</Typography>

<Box display='flex' alignItems='left' color='white'>
Expand All @@ -226,9 +226,9 @@ function Banner() {
component='h3'
>
<time dateTime={hothStart.toISOString()} hidden>
{month} {startDay}{endDayString}, 2022
{month} {startDay}{endDayString}, 2024
</time>
<b>Date:</b> Saturday, March 2, 2024
<b>Date:</b> Sunday, March 3, 2024
</Typography>
</Tooltip>
</Box>
Expand Down
10 changes: 5 additions & 5 deletions src/components/HomePage/FAQSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const useStyles = makeStyles(theme => ({
}));

function AccordionQA({ index, question, answer }) {
const [expanded, setExpanded] = useState(index === 0);
const [expanded, setExpanded] = useState(index === -1);
const classes = useStyles();
const panelName = 'faqPanel' + index;
const theme = useTheme();
Expand Down Expand Up @@ -112,8 +112,8 @@ AccordionQA.propTypes = {
function FAQSection() {
const hothNum = 'XI';
const appDeadline = 'Monday, February 26, 2024';
const hothDate = 'Saturday, March 2, 2024';
const hothLocation = 'Hill';
const hothDate = 'Sunday, March 3, 2024';
const hothLocation = 'Carnesale Commons, Palisades Room';
const faqs = [
{
question: `What's a hackathon?`,
Expand All @@ -122,7 +122,7 @@ function FAQSection() {
A hackathon is an event during which people from different backgrounds
come together to create a project from start to finish in a limited time frame.
Check out some examples from last year&apos;s
HOTH <Link href='https://hoth9.devpost.com/project-gallery'>here</Link>!
HOTH <Link href='https://hothx.devpost.com/project-gallery'>here</Link>!
</>
},
{
Expand Down Expand Up @@ -162,7 +162,7 @@ function FAQSection() {
},
{
question: `What if I have never made a project before?`,
answer: `No worries! Throughout HOTH ${hothNum}, you'll have access to workshops on all sorts of
answer: `No worries! Throughout HOTH ${hothNum}, you'll have access to workshops on all sorts of
topics to help you start bringing your ideas to life and mentors to support you through
any road blocks.`
},
Expand Down
13 changes: 8 additions & 5 deletions src/components/HomePage/HothDescription.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ const useStyles = makeStyles(theme => ({
textAlign: 'center',
fontSize: '4em',
fontWeight: theme.typography.fontWeightBold,
color: theme.palette.primary.main,
background: 'linear-gradient(199.69deg, #FF5F96 21.64%, #BD01FF 72.25%)',
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
[theme.breakpoints.down('sm')]: {
fontSize: '3.5em'
},
Expand All @@ -41,8 +43,8 @@ const useStyles = makeStyles(theme => ({
catchphrase: {
textAlign: 'center',
fontSize: '2.5em',
fontWeight: theme.typography.fontWeightBold,
color: theme.palette.primary.dark,
fontWeight: 400,
color: theme.palette.secondary.light,
padding: theme.spacing(2),
[theme.breakpoints.down('sm')]: {
fontSize: '2em'
Expand Down Expand Up @@ -100,7 +102,7 @@ export default function HothDescription() {
Hack on the Hill?
</Typography>
<Typography variant='h2' className={classes.catchphrase}
style={{ fontWeight: 500, paddingBottom: isSmall ? theme.spacing(2) : theme.spacing(8) }}>
style={{ paddingBottom: isSmall ? theme.spacing(2) : theme.spacing(8) }}>
Explore. Build. Empower.
</Typography>
</hgroup>
Expand All @@ -113,7 +115,8 @@ export default function HothDescription() {
Hack on the Hill (HOTH XI) is a{' '}
<strong>12-hour beginner-friendly</strong>
{' '}hackathon designed to be your first hackathon experience.
HOTH XI will be in-person on the Hill with the specific room TBD. We hope to see you there!
HOTH XI will be in-person on the Hill in the Carnesale Commons Palisades Room.
We hope to see you there!
</Typography>
</RightGridItem>
</Grid>
Expand Down
27 changes: 23 additions & 4 deletions src/components/MenuBar/ButtonBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import Button from '@material-ui/core/Button';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/core/styles';
import LinkNoStyle from '../LinkNoStyle/LinkNoStyle.js';
import { applicationOpen, applyDeadline } from '../constants.js';

import {
applicationOpen,
applyDeadline,
hothStart,
hothEnd
} from '../constants.js';

const useStyles = makeStyles(theme => {
return {
Expand Down Expand Up @@ -76,6 +82,7 @@ function ButtonBar({ isMobile }) {
to: PropTypes.string.isRequired
};


const links = [
{
name: 'Home',
Expand Down Expand Up @@ -109,13 +116,25 @@ function ButtonBar({ isMobile }) {
<PoppinLink to={link.to} key={`nav-${index}`}>
{link.name}
</PoppinLink>)}
{

{Date.now() < hothStart.getTime() ?
<ApplyLink
disabled={Date.now() < applicationOpen.getTime() || Date.now() > applyDeadline.getTime()}
disabled={
Date.now() < applicationOpen.getTime() ||
Date.now() > applyDeadline.getTime()
}
href={'https://forms.gle/VMhdCzMov8RvGUfP8'}
target='_blank'
target="_blank"
>
Apply
</ApplyLink> :
<ApplyLink
disabled={
Date.now() < hothStart.getTime() || Date.now() > hothEnd.getTime()
}
href="/submissions"
>
Submit
</ApplyLink>
}
</>
Expand Down
12 changes: 6 additions & 6 deletions src/components/PrizePage/Prizes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,37 @@ const allPrizes = [
{
img: 'overall',
track: 'Best Overall',
prize: '$250 Amazon Gift Card'
prize: '$150 Amazon Gift Card'
// caption: '1 Echo Studio'
},
{
img: 'web',
track: 'Best Web',
prize: '$100 Amazon Gift Card'
prize: '$80 Amazon Gift Card'
// caption: '1 Massage Gun'
},
{
img: 'mobile',
track: 'Best Mobile',
prize: '$100 Amazon Gift Card'
prize: '$80 Amazon Gift Card'
// caption: '4 Yeti Mugs'
},
{
img: 'game',
track: 'Best Game',
prize: '$100 Amazon Gift Card'
prize: '$80 Amazon Gift Card'
// caption: '4 Laptop Stands'
},
{
img: 'ie',
track: 'Best in Intersectional Environmentalism',
prize: '$100 Amazon Gift Card'
prize: '2 Camping Hammocks and 2 Wireless Charging Pads'
// caption: '4 Mini Phone Printers'
},
{
img: 'beg',
track: 'Best Beginner',
prize: '$100 Amazon Gift Card'
prize: '4 Wireless 3-in-1 Charging Stations'
// caption: '4 Butt Cushions'
}
];
Expand Down
3 changes: 2 additions & 1 deletion src/components/SchedulePage/Schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import Divider from '@material-ui/core/Divider';
import StickyTimeSlot from '../SchedulePage/StickyTimeSlot';
import eventSchedule from '../../data/eventSchedule';
import ComingSoon from '../ComingSoon/ComingSoon';
import { scheduleAvailableTime } from '../constants';

// When changing this, make sure to update src/components/HomePage/UpcomingEvents.js as well.
const scheduleAvailable = false;
const scheduleAvailable = Date.now() > scheduleAvailableTime.getTime();

const useStyles = makeStyles(theme => ({
title: {
Expand Down
94 changes: 94 additions & 0 deletions src/components/SubmissionsPage/Submissions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import React, { useState } from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import Container from '@material-ui/core/Container';
import Link from '@material-ui/core/Link';

const useStyles = makeStyles(theme => ({
title: {
fontWeight: theme.typography.fontWeightBold,
paddingTop: theme.spacing(11),
[theme.breakpoints.down('sm')]: {
paddingTop: theme.spacing(4)
},
paddingBottom: theme.spacing(4)
},
info: {
paddingTop: theme.spacing(4)
},
link: {
color: theme.palette.secondary.main
},
linkClicked: {
color: theme.palette.secondary.dark
}
}));

const SubmissionsPage = () => {
const classes = useStyles();

const [formClicked, setFormClicked] = useState(false);
const [devPostClicked, setDevPostClicked] = useState(false);

const handleFormClick = () => {
setFormClicked(true);
};

const handleDevPostClick = () => {
setDevPostClicked(true);
};

return (
<Container maxWidth="md">
<Typography
align="left"
variant="h4"
component="h1"
className={classes.title}
>
Submission Info
</Typography>

<Typography align="left" variant="h5" component="h2">
Follow These 2 Final Steps to Submit Your Project:
</Typography>

<Typography className={classes.info}>
1{')'} Submit the project on the HOTH XI{' '}
<Link
href="https://hoth-xi.devpost.com/?ref_feature=challenge&ref_medium=discover"
target="_blank"
className={devPostClicked ? classes.linkClicked : classes.link}
onClick={handleDevPostClick}
rel="noopener noreferrer"
>
Devpost
</Link>
</Typography>

<Typography className={classes.info}>
2{')'} Fill out the HOTH XI{' '}
<Link
href="https://forms.gle/VPBHtLTyPo1pn7pn9"
target="_blank"
className={formClicked ? classes.linkClicked : classes.link}
onClick={handleFormClick}
rel="noopener noreferrer"
>
Submission Google Form
</Link>
</Typography>

<Typography
className={classes.info}
align="left"
variant="h6"
component="h3"
>
Thank You for Participating in HOTH XI!
</Typography>
</Container>
);
};

export default SubmissionsPage;
Loading

0 comments on commit 6c59760

Please sign in to comment.