import React from 'react'; import Grid from '@mui/material/Grid'; import Button from '@mui/material/Button'; import Typography from '@mui/material/Typography'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import ListItemText from '@mui/material/ListItemText'; import ListItemIcon from '@mui/material/ListItemIcon'; import PowerIcon from '@mui/icons/Power'; import { makeStyles } from '@mui/material/styles'; import { querySessions } from '../api/bbgo'; const useStyles = makeStyles((theme) => ({ formControl: { marginTop: theme.spacing(1), marginBottom: theme.spacing(1), minWidth: 120, }, buttons: { display: 'flex', justifyContent: 'flex-end', marginTop: theme.spacing(2), paddingTop: theme.spacing(2), paddingBottom: theme.spacing(2), '& > *': { marginLeft: theme.spacing(1), }, }, })); export default function ReviewSessions({ onBack, onNext }) { const classes = useStyles(); const [sessions, setSessions] = React.useState([]); React.useEffect(() => { querySessions((sessions) => { setSessions(sessions); }); }, []); const items = sessions.map((session, i) => { console.log(session); return ( ); }); return ( Review Sessions {items} { if (onBack) { onBack(); } }} > Back { if (onNext) { onNext(); } }} > Next ); }