Skip to content

Commit

Permalink
fixed linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
desai-dev committed Apr 3, 2024
1 parent fd773e1 commit b34fb14
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/intake/ProgramForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const ProgramForm = ({
type="string"
placeholder="DD/MM/YYYY"
icon={<Icon as={Calendar} />}
validate={validateDate}
validate={(value: string) => validateDate(value)}
/>
{dateOfBirthError && (
<div style={{ color: "red" }}>{dateOfBirthError}</div>
Expand Down
10 changes: 4 additions & 6 deletions frontend/src/components/intake/ReferralForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ const ReferralForm = ({
});
};

const [
referringWorkerContactError,
setreferringWorkerContactError,
] = useState<string | null>(null);
const [referringWorkerContactError, setreferringWorkerContactError] =
useState<string | null>(null);
const [refferalDateError, setRefferalDateError] = useState<string | null>(
null,
);
Expand Down Expand Up @@ -154,7 +152,7 @@ const ReferralForm = ({
type="string"
placeholder="(e.g. 555-555-5555, ext. 123)"
icon={<Icon as={Phone} />}
validate={validatePhone}
validate={(value: string) => validatePhone(value)}
/>
{referringWorkerContactError && (
<div style={{ color: "red" }}>
Expand Down Expand Up @@ -208,7 +206,7 @@ const ReferralForm = ({
type="string"
placeholder="DD/MM/YYYY"
icon={<Icon as={Calendar} />}
validate={validateDate}
validate={(value: string) => validateDate(value)}
/>
{refferalDateError && (
<div style={{ color: "red" }}>{refferalDateError}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ const AddChild = ({
});
const [providers, setProviders] = useState<Providers>([]);
const [childInfoDateError, setChildInfoDateError] = useState<boolean>(false);
const [
childInfoSchoolPhoneNoError,
setChildInfoSchoolPhoneNoError,
] = useState<boolean>(false);
const [childInfoSchoolPhoneNoError, setChildInfoSchoolPhoneNoError] =
useState<boolean>(false);

const requiredInfomationMissing: boolean =
!childDetails.childName ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const ChildInformationForm = ({
dateOfBirth: e.target.value,
})
}
validate={validateDate}
validate={(value: string) => validateDate(value)}
/>
{dateOfBirthError && (
<div style={{ color: "red" }}>{dateOfBirthError}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const SchoolDaycareForm = ({
schoolPhoneNo: e.target.value,
})
}
validate={validatePhone}
validate={(value: string) => validatePhone(value)}
/>
{schoolPhoneNoError && (
<div style={{ color: "red" }}>{schoolPhoneNoError}</div>
Expand Down

0 comments on commit b34fb14

Please sign in to comment.