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

Misc fixes #248

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions components/Home/Events/Events.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
top: 17%;
left: 50%;
transform: translateX(-50%);
color: black;

h1 {
font-size: 81px;
Expand Down
4 changes: 2 additions & 2 deletions components/Home/Events/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ const Events: FC = () => {
Urbana-Champaign's premiere collegiate hackathon.
</p>
<p>
Join us in-person from February 23th to February 25th at the
Join us in-person from February 28th to March 2nd at the
Siebel Center for Computer Science! Participants can work
individually or in teams to submit projects to a specific
track for a chance to win prizes.{" "}
</p>
<p>
<b>
<i>Adventure awaits!</i>
<i>Pursue your prophecy!</i>
</b>
</p>
</div>
Expand Down
40 changes: 7 additions & 33 deletions components/Registration/Pages/Transportation/Transportation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,10 @@ import Checkboxes, {
import styles from "./Transportation.module.scss";
import React from "react";

const travelAcknowledgeOptions = [
const acknowledgeOptions = [
{
label: "Yes",
value: "YES",
isRadio: true
},
{
label: "No",
value: "NO",
isRadio: true
}
] satisfies CheckboxOption[];

const travelMethodOptions = [
{
label: "Self Travel",
value: "SELF_TRAVEL",
isRadio: true
},
{
label: "Bus Charter",
value: "BUS_CHARTER",
isRadio: true
label: "",
value: "YES"
}
] satisfies CheckboxOption[];

Expand All @@ -37,18 +18,11 @@ type PropTypes = {
const Transportation: React.FC<PropTypes> = ({ onChangePage }) => {
return (
<div className={styles.container}>
<h1>Transportation</h1>
<Checkboxes
name="travelAcknowledge"
label="Are you aware that you are responsible for your own
transportation to the site?"
options={travelAcknowledgeOptions}
required
/>
<h1>Code of Conduct</h1>
<Checkboxes
name="travelMethod"
label="How will you be getting to HackIllinois?"
options={travelMethodOptions}
name="acknowledge"
label="I acknowledge that I have read, understood, and agree to abide by the HackIllinois Code of Conduct."
options={acknowledgeOptions}
required
/>
</div>
Expand Down
8 changes: 2 additions & 6 deletions components/Registration/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ const hackSpecific = yup.object({
});

const transportation = yup.object({
travelAcknowledge: yup
acknowledge: yup
.array()
.of(yup.string())
.min(1, "Please select one option"),
travelMethod: yup
.array()
.of(yup.string())
.min(1, "Please select one option")
.min(1, "Please acknowledge the Code of Conduct")
});

const registrationSchemas = [
Expand Down
12 changes: 1 addition & 11 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
async redirects() {
return [
{
source: "/",
destination: "https://hype.hackillinois.org",
permanent: false
}
];
}
};
const nextConfig = {};

module.exports = nextConfig;
3 changes: 2 additions & 1 deletion util/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export async function uploadFile(file: File, type: FileType): Promise<unknown> {
export function registerUpdate(
registration: RegistrationType
): Promise<WithId<RegistrationType>> {
console.log("submitted", registration);
// console.log("submitted", registration);
return requestv2("POST", `/registration`, registration).catch(body =>
handleError(body)
);
Expand Down Expand Up @@ -210,6 +210,7 @@ export function registrationFromAPI(

return {
...registration,
acknowledge: [],
race: registration.race.length === 1 ? registration.race[0] : "",
gradYear: registration.gradYear === 0 ? "" : `${registration.gradYear}`,
requestedTravelReimbursement,
Expand Down
1 change: 1 addition & 0 deletions util/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type RegistrationData = {
hackOutreach: string[];
hackInterest: string[];
dietaryRestrictions: string[];
acknowledge: string[];
requestedTravelReimbursement: string[];
isProApplicant: boolean;
};
Expand Down