Skip to content

Commit

Permalink
Merge pull request #535 from nwplus/convert-to-nwhacks
Browse files Browse the repository at this point in the history
Convert portal back to nwHacks 2024
  • Loading branch information
meleongg authored Nov 30, 2023
2 parents 9620450 + da72b13 commit ac6d3de
Show file tree
Hide file tree
Showing 30 changed files with 426 additions and 11,600 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<title>HackCamp 2023 Portal</title>
<title>nwHacks 2024 Portal</title>
</head>

<body>
Expand Down
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
Sponsors,
Submission,
} from './pages'
import Area51 from './pages/Area51'
// import Area51 from './pages/Area51'
import GlobalStyle from './theme/GlobalStyle'
import ThemeProvider from './theme/ThemeProvider'
import { AuthProvider, getRedirectUrl, useAuth } from './utility/Auth'
Expand Down Expand Up @@ -260,9 +260,9 @@ function App() {
<AdminAuthPageRoute path="/judging/admin">
<JudgingAdmin />
</AdminAuthPageRoute>
<AdminAuthPageRoute path="/area51">
{/* <AdminAuthPageRoute path="/area51">
<Area51 />
</AdminAuthPageRoute>
</AdminAuthPageRoute> */}
<Route path="/judging/view/:id" component={JudgingViewContainer} />
<Route path="/projects" component={GalleryContainer} />
<Route path="/projects/:id" component={ProjectViewContainer} />
Expand Down
Binary file removed src/assets/hackcamp2023background.png
Binary file not shown.
4,212 changes: 0 additions & 4,212 deletions src/assets/hackcamp2023background.svg

This file was deleted.

6,607 changes: 0 additions & 6,607 deletions src/assets/hc2023login.svg

This file was deleted.

Binary file removed src/assets/hc2023mainbg.png
Binary file not shown.
Binary file removed src/assets/hc2023noobjectsbg.png
Binary file not shown.
Binary file removed src/assets/hc2023sidebarbg.png
Binary file not shown.
225 changes: 143 additions & 82 deletions src/components/ApplicationForm/BasicInfo.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
import React from 'react'
import styled from 'styled-components'
import { QuestionHeading, CenteredH1, P, ErrorMessage, ErrorSpan as Required } from '../Typography'
import { TextInput } from '../Input/TextInput'
import Dropdown from '../Input/Dropdown'
import Select from '../Input/Select'
import { FormSpacing, SubHeading } from './'
import schools from '../../containers/Application/data/schools.json'
import majors from '../../containers/Application/data/majors.json'
import { findElement, creatableDropdownValue } from '../../utility/utilities'
import schools from '../../containers/Application/data/schools.json'
import {
DIETARY_RESTRICTION_OPTIONS,
PRONOUN_OPTIONS,
ETHNICITY_OPTIONS,
PRONOUN_OPTIONS,
} from '../../utility/Constants'
import { creatableDropdownValue, findElement } from '../../utility/utilities'
import Dropdown from '../Input/Dropdown'
import Select from '../Input/Select'
import { TextInput } from '../Input/TextInput'
import {
CenteredH1,
ErrorMessage,
H2,
P,
QuestionHeading,
ErrorSpan as Required,
} from '../Typography'
import { FormSpacing, SubHeading } from './'

const genderOptions = [
{ value: 'female', label: 'Woman' },
Expand Down Expand Up @@ -45,14 +52,25 @@ const educationOptions = [
{ value: 'prefer not to answer', label: 'Prefer not to answer' },
]

const identifyAsUnderrepresentedOptions = [
{ value: 'yes', label: 'Yes' },
{ value: 'no', label: 'No' },
{ value: 'unsure', label: 'Unsure' },
{ value: 'preferNotToAnswer', label: 'Prefer not to answer' },
// Removed as of nwHacks 2024
// const identifyAsUnderrepresentedOptions = [
// { value: 'yes', label: 'Yes' },
// { value: 'no', label: 'No' },
// { value: 'unsure', label: 'Unsure' },
// { value: 'preferNotToAnswer', label: 'Prefer not to answer' },
// ]

const academicYear = [
{ value: 'Secondary/High School', label: 'Secondary/High School' },
{ value: '1st year', label: '1st year' },
{ value: '2nd year', label: '2nd year' },
{ value: '3rd year', label: '3rd year' },
{ value: '4th year', label: '4th year' },
{ value: 'Graduate school', label: 'Graduate school' },
]

const graduationOptions = [
{ value: 2023, label: '2023' },
{ value: 2024, label: '2024' },
{ value: 2025, label: '2025' },
{ value: 2026, label: '2026' },
Expand Down Expand Up @@ -344,12 +362,11 @@ const StyledTextInput = styled(TextInput)`
export default ({ refs, errors, formInputs, onChange }) => (
<>
<FormSpacing>
<CenteredH1>
Tell us about yourself!{' '}
<span role="img" aria-label="smile">
&#128578;
</span>
</CenteredH1>
<CenteredH1>General Questions</CenteredH1>
<H2>
First, we’d like to ask a few general questions about you. The information entered here does
not affect your application as a hacker.
</H2>
</FormSpacing>

<FormSpacing>
Expand Down Expand Up @@ -516,7 +533,39 @@ export default ({ refs, errors, formInputs, onChange }) => (
<FormSpacing>
<QuestionHeading>question 06</QuestionHeading>
<SubHeading>
What level of education are you currently studying at?
<span role="img" aria-label="Book emoji">
📖
</span>{' '}
{formInputs.educationLevel === 'high school'
? 'What do you plan on studying?'
: 'What is your current or intended major?'}
<Required />
</SubHeading>
<P>Enter your intended/current major, or unknown</P>
{errors?.major && <ErrorMessage>{errors?.major}</ErrorMessage>}
<Dropdown
options={majors}
placeholder="Enter your major"
isSearchable
formatCreateLabel={inputValue => `${inputValue}`}
label={formInputs.major}
value={creatableDropdownValue(majors, 'label', formInputs.major)}
onChange={e =>
onChange({
major: e.label,
})
}
emptySearchDefaultOption="Start typing to search"
canCreateNewOption
isValid={!errors?.major}
customRef={refs['majorRef']}
/>
</FormSpacing>

<FormSpacing>
<QuestionHeading>question 07</QuestionHeading>
<SubHeading>
What is your level of study?
<Required />
</SubHeading>
{errors?.educationLevel && <ErrorMessage>{errors?.educationLevel}</ErrorMessage>}
Expand Down Expand Up @@ -551,7 +600,7 @@ export default ({ refs, errors, formInputs, onChange }) => (
</FormSpacing>

<FormSpacing>
<QuestionHeading>question 07</QuestionHeading>
<QuestionHeading>question 08</QuestionHeading>
<SubHeading>
What is your (expected) graduation year?
<Required />
Expand All @@ -573,7 +622,29 @@ export default ({ refs, errors, formInputs, onChange }) => (
</FormSpacing>

<FormSpacing>
<QuestionHeading>question 08</QuestionHeading>
<QuestionHeading>question 09</QuestionHeading>
<SubHeading>
What is your current academic year?
<Required />
</SubHeading>
{errors?.academicYear && <ErrorMessage>{errors?.academicYear}</ErrorMessage>}
<Dropdown
options={academicYear}
placeholder="Academic Year"
isSearchable={false}
value={findElement(graduationOptions, 'value', formInputs.academicYear)}
onChange={inputValue =>
onChange({
academicYear: inputValue.value,
})
}
isValid={!errors?.academicYear}
customRef={refs['academicYearRef']}
/>
</FormSpacing>

<FormSpacing>
<QuestionHeading>question 10</QuestionHeading>
<SubHeading>
What is your country of residence?
<Required />
Expand All @@ -596,7 +667,7 @@ export default ({ refs, errors, formInputs, onChange }) => (
</FormSpacing>

<FormSpacing>
<QuestionHeading>question 09</QuestionHeading>
<QuestionHeading>question 11</QuestionHeading>
<SubHeading>
Dietary restrictions
<Required />
Expand Down Expand Up @@ -636,11 +707,41 @@ export default ({ refs, errors, formInputs, onChange }) => (
</FormSpacing>

<FormSpacing>
<QuestionHeading>question 10</QuestionHeading>
<QuestionHeading>question 12</QuestionHeading>
<SubHeading>
Do you identify as part of an underrepresented gender in the technology industry?
Will you be 19 years of age or older by January 20th, 2024?
<Required />
</SubHeading>
{errors?.willBeAgeOfMajority && <ErrorMessage>{errors?.willBeAgeOfMajority}</ErrorMessage>}
<Select
type="radio"
label="Yes"
checked={formInputs.willBeAgeOfMajority}
onChange={() => onChange({ willBeAgeOfMajority: true })}
customRef={refs['willBeAgeOfMajorityRef']}
/>
<Select
type="radio"
label="No"
checked={formInputs.willBeAgeOfMajority === false}
onChange={() => onChange({ willBeAgeOfMajority: false })}
/>
</FormSpacing>

<FormSpacing>
<CenteredH1>Optional Questions</CenteredH1>
<H2>
The following questions are completely optional and do not affect your application as a
hacker.
</H2>
</FormSpacing>

{/* Removed as of nwHacks 2024 */}
{/* <FormSpacing>
<QuestionHeading>question 13</QuestionHeading>
<SubHeading>
Do you identify as part of an underrepresented gender in the technology industry?
</SubHeading>
{errors?.identifyAsUnderrepresented && (
<ErrorMessage>{errors?.identifyAsUnderrepresented}</ErrorMessage>
)}
Expand All @@ -661,18 +762,17 @@ export default ({ refs, errors, formInputs, onChange }) => (
isValid={!errors?.identifyAsUnderrepresented}
customRef={refs['identifyAsUnderrepresentedRef']}
/>
</FormSpacing>
</FormSpacing> */}

<FormSpacing>
<QuestionHeading>question 11</QuestionHeading>
<QuestionHeading>question 13</QuestionHeading>
<SubHeading>
<span role="img" aria-label="Mushroom emoji">
🍄
</span>{' '}
What are your pronouns?
<Required />
</SubHeading>
{errors?.pronouns && <ErrorMessage>{errors?.pronouns}</ErrorMessage>}
{/* {errors?.pronouns && <ErrorMessage>{errors?.pronouns}</ErrorMessage>} */}
{formInputs &&
Object.entries(formInputs?.pronouns)
.sort()
Expand Down Expand Up @@ -707,15 +807,14 @@ export default ({ refs, errors, formInputs, onChange }) => (
</FormSpacing>

<FormSpacing>
<QuestionHeading>question 12</QuestionHeading>
<QuestionHeading>question 14</QuestionHeading>
<SubHeading>
<span role="img" aria-label="Person raising one hand emoji">
🙋
</span>{' '}
What is your gender identity?
<Required />
What is your gender do you identify as?
</SubHeading>
{errors?.gender && <ErrorMessage>{errors?.gender}</ErrorMessage>}
{/* {errors?.gender && <ErrorMessage>{errors?.gender}</ErrorMessage>} */}
<Dropdown
options={genderOptions}
placeholder="Gender"
Expand Down Expand Up @@ -745,12 +844,9 @@ export default ({ refs, errors, formInputs, onChange }) => (
</FormSpacing>

<FormSpacing>
<QuestionHeading>question 13</QuestionHeading>
<SubHeading>
What is your race/ethnicity?
<Required />
</SubHeading>
{errors?.ethnicity && <ErrorMessage>{errors?.ethnicity}</ErrorMessage>}
<QuestionHeading>question 15</QuestionHeading>
<SubHeading>What is your race/ethnicity?</SubHeading>
{/* {errors?.ethnicity && <ErrorMessage>{errors?.ethnicity}</ErrorMessage>} */}
{formInputs &&
Object.entries(formInputs?.ethnicity)
.sort()
Expand Down Expand Up @@ -784,57 +880,22 @@ export default ({ refs, errors, formInputs, onChange }) => (
)}
</FormSpacing>

{/* ADD legally authorized to work in Canada */}
<FormSpacing>
<QuestionHeading>question 14</QuestionHeading>
<SubHeading>
<span role="img" aria-label="Book emoji">
📖
</span>{' '}
{formInputs.educationLevel === 'high school'
? 'What do you plan on studying?'
: 'What is your current or intended major?'}
<Required />
</SubHeading>
<P>Enter your intended/current major, or unknown</P>
{errors?.major && <ErrorMessage>{errors?.major}</ErrorMessage>}
<Dropdown
options={majors}
placeholder="Enter your major"
isSearchable
formatCreateLabel={inputValue => `${inputValue}`}
label={formInputs.major}
value={creatableDropdownValue(majors, 'label', formInputs.major)}
onChange={e =>
onChange({
major: e.label,
})
}
emptySearchDefaultOption="Start typing to search"
canCreateNewOption
isValid={!errors?.major}
customRef={refs['majorRef']}
/>
</FormSpacing>

<FormSpacing>
<QuestionHeading>question 15</QuestionHeading>
<SubHeading>
Will you be 19 years of age or older by January 20th, 2024?
<Required />
</SubHeading>
{errors?.willBeAgeOfMajority && <ErrorMessage>{errors?.willBeAgeOfMajority}</ErrorMessage>}
<QuestionHeading>question 16</QuestionHeading>
<SubHeading>Are you legally authorized to work in Canada?</SubHeading>
<Select
type="radio"
label="Yes"
checked={formInputs.willBeAgeOfMajority}
onChange={() => onChange({ willBeAgeOfMajority: true })}
customRef={refs['willBeAgeOfMajorityRef']}
checked={formInputs.isAuthorizedToWorkInCanada}
onChange={() => onChange({ isAuthorizedToWorkInCanada: true })}
customRef={refs['isAuthorizedToWorkInCanadaRef']}
/>
<Select
type="radio"
label="No"
checked={formInputs.willBeAgeOfMajority === false}
onChange={() => onChange({ willBeAgeOfMajority: false })}
checked={formInputs.isAuthorizedToWorkInCanada === false}
onChange={() => onChange({ isAuthorizedToWorkInCanada: false })}
/>
</FormSpacing>
</>
Expand Down
Loading

0 comments on commit ac6d3de

Please sign in to comment.