Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kayla/submissions page #415

Merged
merged 6 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/components/MenuBar/ButtonBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { makeStyles } from '@material-ui/core/styles';
import { Link as GatsbyLink } from 'gatsby';
import { Link as MUILink } from '@material-ui/core';

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

const useStyles = makeStyles(theme => {
const menuBarAdaptiveThreshold = theme.breakpoints.values.sm * 1.3;
Expand Down Expand Up @@ -80,13 +80,20 @@ function ButtonBar({ isMobile }) {
<PoppinLink to={link.to} key={`nav-${index}`}>
{link.name}
</PoppinLink>)}
{

{Date.now() < hothStart.getTime() ?
<BorderLink
disabled={Date.now() < applicationOpen.getTime() || Date.now() > applyDeadline.getTime()}
href={'https://forms.gle/VMhdCzMov8RvGUfP8'}
target='_blank'
>
Apply
Apply
</BorderLink> :
<BorderLink
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After HOTH ends, this Submit button will show as a disabled button, which is not an issue but is that functionality you want? Imo, it might be weird to have a disabled Submit button for the rest of the year when HOTH is not running, but we can always fix that later.

disabled={Date.now() < hothStart.getTime() || Date.now() > hothEnd.getTime()}
href='/submissions'
>
Submit
</BorderLink>
}
</>
Expand Down
56 changes: 56 additions & 0 deletions src/components/SubmissionsPage/Submissions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React 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 'gatsby';

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)

},
divider: {
height: '2px',
marginLeft: theme.spacing(4),
marginRight: theme.spacing(4),
marginBottom: theme.spacing(4)
}
}));


const SubmissionsPage = () => {
const classes = useStyles();
return <Container maxWidth='md'>
<Typography align='left' variant='h4' component='h1' className={classes.title}>
Submission Info
</Typography>

<Typography align='left' variant='h5' component='h2'>
Thank You for Participating in HOTH XI!
</Typography>

<Typography align='left' variant='h5' component='h2'>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little odd to have 2 lines so close to each other that have the same styling, like this. Maybe we can move the Thank you text to the bottom after the steps to submit and make it variant='h6' component='h3' or something?

Follow These 2 Final Steps to Submit Your Project:
</Typography>

<Typography className={classes.info}>
1{')'} Submit the project on the HOTH XI devpost: {' '}
<Link to='https://hoth-xi.devpost.com/?ref_feature=challenge&ref_medium=discover'>devvvvpostttt</Link>
</Typography>

<Typography className={classes.info}>
2{')'} Fill out the HOTH XI submission Google Form: {' '}
<Link to='https://forms.gle/VPBHtLTyPo1pn7pn9'>HOTH XI Submission Form</Link>
</Typography>
</Container>;
};

export default SubmissionsPage;
4 changes: 2 additions & 2 deletions src/components/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const hothStart = new Date('2024-03-02T08:00:00-08:00');
export const hothEnd = new Date('2024-03-02T23:00:00-08:00');
export const hothStart = new Date('2024-03-03T08:00:00-08:00');
export const hothEnd = new Date('2024-03-03T23:00:00-08:00');
export const applyDeadline = new Date('2024-02-26T23:59:59-08:00');
export const applicationOpen = new Date('2024-01-29T08:00:00-08:00');
export const scheduleAvailableTime = new Date('2024-02-26T08:00:00-08:00');
15 changes: 15 additions & 0 deletions src/pages/submissions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';

import Layout from '../components/layout';
import SEO from '../components/seo';
import Submissions from '../components/SubmissionsPage/Submissions';


const SubmissionsPage = () => {
return <Layout>
<SEO title='Submissions' />
<Submissions/>
</Layout>;
};

export default SubmissionsPage;
Loading