From 918d9f0d1e072a3cb465a0d6d6229c14ed12c4e3 Mon Sep 17 00:00:00 2001 From: porink0424 Date: Fri, 12 Apr 2024 17:03:02 +0900 Subject: [PATCH] Resolve type errors --- optuna_dashboard/ts/components/AppDrawer.tsx | 5 +++-- .../ts/components/CompareStudies.tsx | 22 ++++++++++++++----- optuna_dashboard/ts/components/GraphEdf.tsx | 6 ++--- .../ts/components/GraphHistory.tsx | 1 + optuna_dashboard/ts/components/Note.tsx | 12 ++++++++-- .../ts/components/StudyDetail.tsx | 20 +++++++++++++---- optuna_dashboard/ts/dateUtil.ts | 2 +- optuna_dashboard/tsconfig.json | 1 + 8 files changed, 52 insertions(+), 17 deletions(-) diff --git a/optuna_dashboard/ts/components/AppDrawer.tsx b/optuna_dashboard/ts/components/AppDrawer.tsx index 068dcff2..f0a31c8b 100644 --- a/optuna_dashboard/ts/components/AppDrawer.tsx +++ b/optuna_dashboard/ts/components/AppDrawer.tsx @@ -175,7 +175,7 @@ export const AppDrawer: FC<{ } return ( - + )} - + {studyId !== undefined && ( @@ -359,6 +359,7 @@ export const AppDrawer: FC<{ aria-describedby="modal-modal-description" > + - + Compare studies with Shift+Click - + {studies.map((study) => { @@ -200,6 +204,7 @@ export const CompareStudies: FC<{ primary={`${study.study_id}. ${study.study_name}`} /> - + @@ -274,7 +283,10 @@ const StudiesGraph: FC<{ studies: StudySummary[] }> = ({ studies }) => { const showStudyDetails = studies.map((study) => studyDetails[study.study_id]) return ( - + + return } const GraphEdfFrontend: FC<{ @@ -74,14 +74,14 @@ const GraphEdfFrontend: FC<{ }, [studies, target, colorTheme]) return ( - + {`EDF for ${target.toLabel(studies[0].objective_names)}`} - + ) } diff --git a/optuna_dashboard/ts/components/GraphHistory.tsx b/optuna_dashboard/ts/components/GraphHistory.tsx index 38b190a3..a4d4aa2c 100644 --- a/optuna_dashboard/ts/components/GraphHistory.tsx +++ b/optuna_dashboard/ts/components/GraphHistory.tsx @@ -210,6 +210,7 @@ export const GraphHistory: FC<{ )} - + {notLatest && !saving && ( <> )} - +