diff --git a/frontend/unified/src/App.tsx b/frontend/unified/src/App.tsx index 961117e..b5152e5 100644 --- a/frontend/unified/src/App.tsx +++ b/frontend/unified/src/App.tsx @@ -1,4 +1,5 @@ import { Box, Divider, Grid2 as Grid, Stack, Typography } from "@mui/material"; +import { SessionSelector } from "./components/SessionSelector"; const VERTICAL_SPACING = 2; const HORIZONTAL_SPACING = 2; @@ -9,11 +10,7 @@ export const App: React.FC = () => { Session - + Scan { + // TODO: initial value based on fetching latest session associated with logged-in user + const [session] = useState("latest-session"); + // TODO: initial value based on the initial session + const [beamline] = useState("Beamline: depends-on-session"); + const [sessionSelectionMode, setSessionSelectionMode] = + useState(SessionSelectionMode.Latest); + const [textInputValue, setTextInputValue] = useState(""); + + return ( + + { + if (toggleButtonLabel === SessionSelectionMode.Latest) { + setSessionSelectionMode(SessionSelectionMode.Latest); + } else if (toggleButtonLabel === SessionSelectionMode.Custom) { + setSessionSelectionMode(SessionSelectionMode.Custom); + } + }} + > + + {SessionSelectionMode.Latest} + + + {SessionSelectionMode.Custom} + + + ) => { + setTextInputValue(e.currentTarget.value); + }} + /> + + + ); +};