Skip to content

Commit

Permalink
style(frontend): fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Jan 20, 2025
1 parent efb44bf commit 5374ee6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frontend-v2/src/components/DropdownButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion frontend-v2/src/features/login/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const Login: FC<LoginProps> = ({ 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.
</Typography>
</Container>
);
Expand Down
12 changes: 6 additions & 6 deletions frontend-v2/src/features/simulation/SimulationsSidePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -46,7 +46,7 @@ type SimulationsSidePanelType = {
layout: string[];
setLayout: (layout: string[]) => void;
plots: SimulationPlot[];
control: Control<Simulation, any>;
control: Control<Simulation, unknown>;
units: UnitRead[];
simulation: SimulationRead;
groups?: SubjectGroupRead[];
Expand Down Expand Up @@ -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;

Expand All @@ -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",
}}
>
<Box
Expand Down
7 changes: 6 additions & 1 deletion frontend-v2/src/features/simulation/useExportSimulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import {
ProjectRead,
SimulateResponse,
} from "../../app/backendApi";
import { FetchBaseQueryError } from "@reduxjs/toolkit/query";
import { SerializedError } from "@reduxjs/toolkit";

interface iExportSimulation {
simInputs: Simulate;
Expand Down Expand Up @@ -47,7 +49,10 @@ export default function useExportSimulation({
simInputs,
model,
project,
}: iExportSimulation): [() => void, { error: any }] {
}: iExportSimulation): [
() => void,
{ error: FetchBaseQueryError | SerializedError | undefined },
] {
const { groups } = useSubjectGroups();
const { compound, protocols } = useProtocols();
const { data: variables } = useVariableListQuery(
Expand Down

0 comments on commit 5374ee6

Please sign in to comment.