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

Small cleanups: fix peer-dep warnings, yarn-deduplicate, use Flow's exact_by_default. #83

Merged
merged 9 commits into from
May 27, 2021
1 change: 1 addition & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
[lints]

[options]
exact_by_default=true

[strict]
2 changes: 1 addition & 1 deletion frontend/Components/VaccineInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getAvailability } from '../Types/Hospital';
import type { Hospital } from '../Types/Hospital';
import type { VaccineType } from '../Types/VaccineType';

export default function VaccineDataGrid(
export default function VaccineInfo(
props: { rows: Array<Hospital>, vaccineType: VaccineType },
): React.Node {
const { rows, vaccineType } = props;
Expand Down
1 change: 0 additions & 1 deletion frontend/Components/VaccineInfo/Cards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default function Cards(
availability={getAvailability(hospital, vaccineType)}
buttonText={buttonText}
department={hospital.department}
hospitalId={hospital.hospitalId}
location={hospital.location}
name={hospital.name}
phone={hospital.phone}
Expand Down
6 changes: 3 additions & 3 deletions frontend/Types/Hospital.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import type { Availability } from './Availability';
import type { Location } from './Location';
import type { VaccineType } from './VaccineType';

export type Hospital = {|
export type Hospital = {
address: string,
department: string,
governmentPaidAvailability: Availability,
hospitalId: Number,
hospitalId: number,
location: Location,
name: string,
phone: string,
selfPaidAvailability: Availability,
website: string,
|};
};

export function getAvailability(hospital: Hospital, vaccineType: VaccineType): Availability {
return vaccineType === 'SelfPaid'
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"license": "MIT",
"devDependencies": {
"@babel/code-frame": "^7.12.13",
"@babel/core": "^7.14.3",
"@parcel/transformer-image": "2.0.0-beta.2",
"@parcel/transformer-yaml": "2.0.0-beta.2",
"babel-eslint": "^10.1.0",
Expand All @@ -17,7 +18,9 @@
"flow-bin": "^0.149.0",
"husky": "^6.0.0",
"parcel": "^2.0.0-beta.2",
"sharp": "^0.28.1"
"postcss": "^8.3.0",
"sharp": "^0.28.1",
"yarn-deduplicate": "^3.1.0"
},
"scripts": {
"backend": "parcel build ./frontend/index.html; cd backend; pipenv run python app.py --scrape",
Expand All @@ -31,6 +34,7 @@
"prepare": "husky install"
},
"dependencies": {
"@types/react": "^17.0.7",
"i18next": "^20.2.4",
"i18next-browser-languagedetector": "^6.1.1",
"react": "^17.0.2",
Expand Down
Loading