From 5374ee6fc1691a7bc351f8a6c7cf42967f4d125f Mon Sep 17 00:00:00 2001 From: Jim O'Donnell Date: Mon, 20 Jan 2025 17:41:41 +0000 Subject: [PATCH] style(frontend): fix linter warnings --- frontend-v2/src/components/DropdownButton.tsx | 2 +- frontend-v2/src/features/login/login.tsx | 2 +- .../src/features/simulation/SimulationsSidePanel.tsx | 12 ++++++------ .../src/features/simulation/useExportSimulation.ts | 7 ++++++- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/frontend-v2/src/components/DropdownButton.tsx b/frontend-v2/src/components/DropdownButton.tsx index 4684fae7..0461fa38 100644 --- a/frontend-v2/src/components/DropdownButton.tsx +++ b/frontend-v2/src/components/DropdownButton.tsx @@ -16,7 +16,7 @@ type Option = { type Props = { options: Option[]; - onOptionSelected: (value: any) => void; + onOptionSelected: (value: Option["value"]) => void; children?: ReactNode; disabled?: boolean; data_cy?: string; diff --git a/frontend-v2/src/features/login/login.tsx b/frontend-v2/src/features/login/login.tsx index e5491e13..63744e97 100644 --- a/frontend-v2/src/features/login/login.tsx +++ b/frontend-v2/src/features/login/login.tsx @@ -94,7 +94,7 @@ const Login: FC = ({ onLogin, isLoading, errorMessage }) => { local law, and all contents and passwords are confidential information, and that unauthorized disclosure or use of such confidential information may result in disciplinary action including termination of my employment - or services and/or legal action based on local law." + or services and/or legal action based on local law. ); diff --git a/frontend-v2/src/features/simulation/SimulationsSidePanel.tsx b/frontend-v2/src/features/simulation/SimulationsSidePanel.tsx index d6f02c21..d4a28d54 100644 --- a/frontend-v2/src/features/simulation/SimulationsSidePanel.tsx +++ b/frontend-v2/src/features/simulation/SimulationsSidePanel.tsx @@ -32,7 +32,7 @@ import { } from "../../app/backendApi"; import { Control } from "react-hook-form"; import { useCollapsibleSidebar } from "../../shared/contexts/CollapsibleSidebarContext"; -import '../../App.css' +import "../../App.css"; type SimulationsSidePanelType = { portalId: string; @@ -46,7 +46,7 @@ type SimulationsSidePanelType = { layout: string[]; setLayout: (layout: string[]) => void; plots: SimulationPlot[]; - control: Control; + control: Control; units: UnitRead[]; simulation: SimulationRead; groups?: SubjectGroupRead[]; @@ -163,11 +163,11 @@ export const SimulationsSidePanel = ({ const onLayoutChange = (value: string) => { if (layout.includes(value)) { - setLayout(layout.filter(layoutValue => value !== layoutValue)) + setLayout(layout.filter((layoutValue) => value !== layoutValue)); } else { setLayout(layout?.length ? [] : [value]); } - } + }; if (!portalRoot || selectedPage !== PageName.SIMULATIONS) return null; @@ -179,10 +179,10 @@ export const SimulationsSidePanel = ({ flexDirection: "column", justifyContent: "space-between", height: "100%", - maxHeight: '100%', + maxHeight: "100%", paddingBottom: "1rem", backgroundColor: "#FBFBFA", - borderRight: "1px solid #DBD6D1" + borderRight: "1px solid #DBD6D1", }} > void, { error: any }] { +}: iExportSimulation): [ + () => void, + { error: FetchBaseQueryError | SerializedError | undefined }, +] { const { groups } = useSubjectGroups(); const { compound, protocols } = useProtocols(); const { data: variables } = useVariableListQuery(