diff --git a/src/webapp/pages/analysis/steps/1-outliers/OutliersStep.tsx b/src/webapp/pages/analysis/steps/1-outliers/OutliersStep.tsx index a0346b2..723f990 100644 --- a/src/webapp/pages/analysis/steps/1-outliers/OutliersStep.tsx +++ b/src/webapp/pages/analysis/steps/1-outliers/OutliersStep.tsx @@ -19,12 +19,12 @@ export const OutliersStep: React.FC = React.memo(props => { }); const runAnalysis = () => { - runAnalysisOutlier( - analysis.id, - section.id, - qualityFilters.threshold, - qualityFilters.algorithm - ); + runAnalysisOutlier({ + algorithm: qualityFilters.algorithm, + analysisId: analysis.id, + sectionId: section.id, + threshold: qualityFilters.threshold, + }); }; if (!analysis) return null; diff --git a/src/webapp/pages/analysis/steps/1-outliers/useOutliers.ts b/src/webapp/pages/analysis/steps/1-outliers/useOutliers.ts index ba5c517..3d93428 100644 --- a/src/webapp/pages/analysis/steps/1-outliers/useOutliers.ts +++ b/src/webapp/pages/analysis/steps/1-outliers/useOutliers.ts @@ -30,7 +30,8 @@ export function useAnalysisOutlier(props: UseRunAnalysisProps) { const [error, setError] = React.useState>(undefined); const runAnalysisOutlier = React.useCallback( - (algorithm: string, analysisId: Id, sectionId: Id, threshold: string) => { + (options: RunAnalysisOptionsProps) => { + const { sectionId, algorithm, analysisId, threshold } = options; setLoading(true); compositionRoot.outlier.run .execute({ @@ -61,3 +62,9 @@ export function useAnalysisOutlier(props: UseRunAnalysisProps) { } type UseRunAnalysisProps = { onSucess: (qualityAnalysis: QualityAnalysis) => void }; +type RunAnalysisOptionsProps = { + algorithm: string; + analysisId: Id; + sectionId: Id; + threshold: string; +};