@@ -21,6 +21,7 @@ import { useGridRangeStore } from "@/hooks/useGridRangeStore";
2121import InputStep from "@/components/Simulation/InputStep" ;
2222import ResultStep from "@/components/Simulation/ResultStep" ;
2323import GridResultStep from "@/components/GridSimulation/GridResultStep" ;
24+ import ErrorBoundary from "@/components/ErrorBoundary.tsx" ;
2425
2526const Models : React . FC = ( ) => {
2627 const [ selectedModels , setSelectedModels ] = useState < ModelConfig [ ] > ( [ ] ) ;
@@ -166,29 +167,31 @@ const Models: React.FC = () => {
166167
167168 return (
168169 < MainContainer >
169- < Step
170- step = { 1 }
171- title = "Models"
172- description = "Select models for simulation. Multiple models can be chained together in a pipeline."
173- />
174- < ModelSelect selectedModels = { selectedModels } setSelectedModels = { setSelectedModels } />
175- < Step step = { 2 } title = "Inputs" />
176- < InputStep selectedModels = { selectedModels } setModelInput = { setModelInput } runGridSimulation = { runGrid } />
177- < Step step = { 3 } title = "Results" />
178- { isGridMode ? (
179- < GridResultStep
180- result = { gridResult }
181- isLoading = { gridIsLoading }
182- error = { gridResultError ?? startGridError }
170+ < ErrorBoundary >
171+ < Step
172+ step = { 1 }
173+ title = "Models"
174+ description = "Select models for simulation. Multiple models can be chained together in a pipeline."
183175 />
184- ) : (
185- < ResultStep
186- simulationResults = { simulationResults }
187- isLoading = { simulationIsLoading }
188- error = { resultError ?? startError }
189- />
190- ) }
191- < div style = { { height : "25dvh" } } />
176+ < ModelSelect selectedModels = { selectedModels } setSelectedModels = { setSelectedModels } />
177+ < Step step = { 2 } title = "Inputs" />
178+ < InputStep selectedModels = { selectedModels } setModelInput = { setModelInput } runGridSimulation = { runGrid } />
179+ < Step step = { 3 } title = "Results" />
180+ { isGridMode ? (
181+ < GridResultStep
182+ result = { gridResult }
183+ isLoading = { gridIsLoading }
184+ error = { gridResultError ?? startGridError }
185+ />
186+ ) : (
187+ < ResultStep
188+ simulationResults = { simulationResults }
189+ isLoading = { simulationIsLoading }
190+ error = { resultError ?? startError }
191+ />
192+ ) }
193+ < div style = { { height : "25dvh" } } />
194+ </ ErrorBoundary >
192195 </ MainContainer >
193196 ) ;
194197} ;
0 commit comments