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

style(frontend): fix linter warnings #643

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading