session variable for eatery from menu
This commit is contained in:
@@ -22,6 +22,8 @@ import MenuIcon from '@mui/material/Menu'
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import {red, green, lightBlue, lightGreen} from '@mui/material/colors';
|
||||
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
||||
import { ReactSession } from 'react-client-session';
|
||||
|
||||
|
||||
const theme = createTheme({
|
||||
palette: {
|
||||
@@ -49,6 +51,40 @@ const navigateLogin = () => {
|
||||
navigate('/');
|
||||
}
|
||||
|
||||
const setStarbucks = () => {
|
||||
ReactSession.set("eatery", "Starbucks");
|
||||
}
|
||||
|
||||
const setChick = () => {
|
||||
ReactSession.set("eatery", "Chick-fil-a");
|
||||
}
|
||||
|
||||
const setABP = () => {
|
||||
ReactSession.set("eatery", "Au Bon Pain");
|
||||
}
|
||||
|
||||
const setMoma = () => {
|
||||
ReactSession.set("eatery", "Modern Market");
|
||||
}
|
||||
|
||||
const setTaco = () => {
|
||||
ReactSession.set("eatery", "Taco Bell");
|
||||
}
|
||||
|
||||
const setDH = () => {
|
||||
ReactSession.set("eatery", "Dining Hall");
|
||||
}
|
||||
|
||||
const setFlip = () => {
|
||||
ReactSession.set("eatery", "Flip Kitchen");
|
||||
}
|
||||
|
||||
const setSmash = () => {
|
||||
ReactSession.set("eatery", "Smashburger");
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
|
||||
<ThemeProvider theme={theme}>
|
||||
@@ -94,7 +130,7 @@ const navigateLogin = () => {
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
Dining Hall
|
||||
</Typography>
|
||||
<Button>View Items</Button>
|
||||
<Button onClick={setDH}>View Items</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -108,7 +144,7 @@ const navigateLogin = () => {
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
Starbucks
|
||||
</Typography>
|
||||
<Button>View Items</Button>
|
||||
<Button onClick={setStarbucks}>View Items</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Box>
|
||||
@@ -128,7 +164,7 @@ const navigateLogin = () => {
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
ABP
|
||||
</Typography>
|
||||
<Button>View Items</Button>
|
||||
<Button onClick={setABP}>View Items</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -142,7 +178,7 @@ const navigateLogin = () => {
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
Chick-fil-a
|
||||
</Typography>
|
||||
<Button>View Items</Button>
|
||||
<Button onClick={setChick}>View Items</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Box>
|
||||
@@ -161,7 +197,7 @@ const navigateLogin = () => {
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
Flip Kitchen
|
||||
</Typography>
|
||||
<Button>View Items</Button>
|
||||
<Button onClick={setFlip}>View Items</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -175,7 +211,7 @@ const navigateLogin = () => {
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
Modern Market
|
||||
</Typography>
|
||||
<Button>View Items</Button>
|
||||
<Button onClick={setMoma}>View Items</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Box>
|
||||
@@ -194,7 +230,7 @@ const navigateLogin = () => {
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
Taco Bell
|
||||
</Typography>
|
||||
<Button>View Items</Button>
|
||||
<Button onClick={setTaco}>View Items</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -208,7 +244,7 @@ const navigateLogin = () => {
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
Smashburger
|
||||
</Typography>
|
||||
<Button>View Items</Button>
|
||||
<Button onClick={setSmash}>View Items</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user