File tree Expand file tree Collapse file tree 2 files changed +24
-19
lines changed Expand file tree Collapse file tree 2 files changed +24
-19
lines changed Original file line number Diff line number Diff line change 11import { Box , Typography , useTheme } from "@mui/material" ;
22import { ReadOnlyInputs } from "components/ReadOnlyInputs" ;
33import { ParamsPanel } from "screens/CollectionPanel" ;
4+ import { ErrorBoundary } from "react-error-boundary" ;
5+ import { FallbackScreen } from "screens/FallbackScreen" ;
46
57export function Extruder ( ) {
68 const theme = useTheme ( ) ;
79 return (
8- < Box marginTop = { 2 } >
9- < Typography
10- variant = "h1"
11- sx = { {
12- color : theme . palette . info . main ,
13- fontSize : 24 ,
14- fontWeight : "fontWeightBold" ,
15- } }
16- >
17- Extruder Data Collection Setup
18- </ Typography >
19- < ReadOnlyInputs
20- visit = "ca://BL24I-MO-IOC-13:GP1"
21- detector = "ca://BL24I-MO-IOC-13:GP15"
22- />
23- < ParamsPanel expt = "extruder" />
24- </ Box >
10+ < ErrorBoundary fallback = { < FallbackScreen /> } >
11+ < Box marginTop = { 2 } >
12+ < Typography
13+ variant = "h1"
14+ sx = { {
15+ color : theme . palette . info . main ,
16+ fontSize : 24 ,
17+ fontWeight : "fontWeightBold" ,
18+ } }
19+ >
20+ Extruder Data Collection Setup
21+ </ Typography >
22+ < ReadOnlyInputs
23+ visit = "ca://BL24I-MO-IOC-13:GP1"
24+ detector = "ca://BL24I-MO-IOC-13:GP15"
25+ />
26+ < ParamsPanel expt = "extruder" />
27+ </ Box >
28+ </ ErrorBoundary >
2529 ) ;
2630}
Original file line number Diff line number Diff line change 11import { Box , Typography } from "@mui/material" ;
22import { CollectionSetupFt } from "components/FixedTarget/CollectionSetupFt" ;
33import { CollectionSetupEx } from "components/Extruder/CollectionSetupEx" ;
4-
4+ import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline" ;
55type ExptType = {
66 expt : "extruder" | "fixed-target" | "jf" ;
77} ;
88
99function FallbackScreen ( ) {
1010 return (
11- < Box >
11+ < Box alignContent = { "center" } >
12+ < ErrorOutlineIcon color = "error" fontSize = "large" />
1213 < Typography component = "h1" variant = "h4" >
1314 Page currently unavailable
1415 </ Typography >
You can’t perform that action at this time.
0 commit comments