Skip to content

Commit

Permalink
Yet even more lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
2s2e committed Feb 20, 2024
1 parent ba472c9 commit 6fc45e9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 31 deletions.
1 change: 0 additions & 1 deletion frontend/src/app/vsr/page.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,4 @@
}

.bottom {

}
29 changes: 12 additions & 17 deletions frontend/src/app/vsr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import TextField from "@/components/TextField";
import MultipleChoice from "@/components/MultipleChoice";
import Dropdown from "@/components/Dropdown";
import HeaderBar from "@/components/HeaderBar";
import PageNumber from "@/components/PageNumber"
import * as validators from "@/util/validateResponses";
import PageNumber from "@/components/PageNumber";
import { createVSR, CreateVSRRequest } from "@/api/VSRs";

interface IFormInput {
Expand Down Expand Up @@ -35,7 +34,6 @@ const VeteranServiceRequest: React.FC = () => {
control,
formState: { errors },
watch,
setValue,
} = useForm<IFormInput>();
const [selectedEthnicity, setSelectedEthnicity] = useState("");

Expand Down Expand Up @@ -87,7 +85,7 @@ const VeteranServiceRequest: React.FC = () => {
];

// Determine if the "Other" textbox should be shown
const showOtherTextbox = selectedEthnicity?.length === 0 || selectedEthnicity === undefined;
//const showOtherTextbox = selectedEthnicity?.length === 0 || selectedEthnicity === undefined;

const onSubmit: SubmitHandler<IFormInput> = async (data) => {
console.log(data);
Expand All @@ -100,9 +98,8 @@ const VeteranServiceRequest: React.FC = () => {
age: data.age,
maritalStatus: data.marital_status,
spouseName: data.spouse,
agesOfBoys: data.ages_of_boys === undefined ? [] : data.ages_of_boys.slice(0, data.num_boys),
agesOfGirls:
data.ages_of_girls === undefined ? [] : data.ages_of_girls.slice(0, data.num_girls),
agesOfBoys: data.ages_of_boys.slice(0, numBoys),
agesOfGirls: data.ages_of_girls.slice(0, numGirls),
ethnicity: finalEthnicity,
employmentStatus: data.employment_status,
incomeLevel: data.income_level,
Expand Down Expand Up @@ -135,12 +132,12 @@ const VeteranServiceRequest: React.FC = () => {
warehouse.
<br></br>
<br></br>
Let us know your specific needs, and we'll provide the best assistance possible. Expect
a response within 48 business hours; remember to check your junk mail if needed.
Let us know your specific needs, and we&apos;ll provide the best assistance possible.
Expect a response within 48 business hours; remember to check your junk mail if needed.
<br></br>
<br></br>
If you're a Veteran or Active Military Reservist in search of our services, simply fill
out and submit the form below.
If you&apos;re a Veteran or Active Military Reservist in search of our services, simply
fill out and submit the form below.
</p>

<div className={styles.fieldsMarked}>
Expand Down Expand Up @@ -448,13 +445,11 @@ const VeteranServiceRequest: React.FC = () => {
</div>
<div className={styles.bottom}>
<div className={styles.submitButton}>
<button className={styles.submit} type="submit">
Submit
</button>
<button className={styles.submit} type="submit">
Submit
</button>
</div>
<PageNumber
pageNum={1}
/>
<PageNumber pageNum={1} />
</div>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import styles from "src/components/Dropdown.module.css";
import { FormControl, InputLabel, Select, MenuItem, SelectChangeEvent } from "@mui/material";
import { FormControl, Select, MenuItem, SelectChangeEvent } from "@mui/material";

export interface DropDownProps {
label: string;
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/MultipleChoice.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React, { useState } from "react";
import Chip from "@mui/material/Chip";
import styles from "@/components/MultipleChoice.module.css";

Expand Down
20 changes: 10 additions & 10 deletions frontend/src/components/PageNumber.module.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.pageNumber{
color: var(--Primary-Background-Dark, #232220);
text-align: center;
/* Desktop/Body 2 */
font-family: "Open Sans";
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: normal;
}
.pageNumber {
color: var(--Primary-Background-Dark, #232220);
text-align: center;
/* Desktop/Body 2 */
font-family: "Open Sans";
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: normal;
}
2 changes: 1 addition & 1 deletion frontend/src/util/validateResponses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function isnum(num: string): boolean {

export function validateDate(date: string): string {
//2 digit number / 2 digit number / 4 digit number
const dateRegex = /^\d{4}\-\d{2}\-\d{2}$/;
const dateRegex = /^\d{4}\d{2}\d{2}$/;
if (dateRegex.test(date)) {
return "Success";
} else {
Expand Down

0 comments on commit 6fc45e9

Please sign in to comment.