working on page formatting
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import React,{useState} from 'react';
|
import React,{useState, useReducer} from 'react';
|
||||||
import {Routes, Route, useNavigate} from 'react-router-dom';
|
import {Routes, Route, useNavigate} from 'react-router-dom';
|
||||||
import './Login.css';
|
import './Login.css';
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
@@ -21,6 +21,7 @@ import MenuIcon from '@mui/material/Menu'
|
|||||||
import MenuItem from '@mui/material/MenuItem';
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
import {red, green, lightBlue, lightGreen} from '@mui/material/colors';
|
import {red, green, lightBlue, lightGreen} from '@mui/material/colors';
|
||||||
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
||||||
|
import { Axios } from 'axios';
|
||||||
|
|
||||||
const theme = createTheme({
|
const theme = createTheme({
|
||||||
palette: {
|
palette: {
|
||||||
@@ -61,6 +62,28 @@ function weekStart(){
|
|||||||
return db_date;
|
return db_date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const [goalInput, setGoalInput] = useReducer(
|
||||||
|
(state, newState) => ({ ...state, ...newState }),
|
||||||
|
{
|
||||||
|
total_cal: "",
|
||||||
|
total_fat: "",
|
||||||
|
total_sat_fat: "",
|
||||||
|
total_trans_fat: "",
|
||||||
|
total_carbs: "",
|
||||||
|
total_fiber: "",
|
||||||
|
total_sugar: "",
|
||||||
|
total_protein: "",
|
||||||
|
total_sodium: "",
|
||||||
|
total_potassium: "",
|
||||||
|
total_cholesterol: "",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleSubmit = evt => {
|
||||||
|
let data = {goalInput}
|
||||||
|
|
||||||
|
Axios.post()
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
@@ -86,57 +109,110 @@ function weekStart(){
|
|||||||
</Toolbar>
|
</Toolbar>
|
||||||
</AppBar>
|
</AppBar>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
<h1> Your Plan</h1>
|
<h1> Your Plan</h1>
|
||||||
|
<h2> Goal for the week of: </h2>
|
||||||
|
|
||||||
<form>
|
<form>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
|
sx={{ paddingBottom: 1 }}
|
||||||
id="calorie-input"
|
id="calorie-input"
|
||||||
label="Calories"
|
label="Calories"
|
||||||
|
size ="small"
|
||||||
/>
|
/>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
id="fat-input"
|
id="fat-input"
|
||||||
label="Fat (g)"
|
label="Fat (g)"
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
id="saturated_fat-input"
|
id="saturated_fat-input"
|
||||||
label="Fat (g)"
|
label="Saturated Fat (g)"
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
id="trans_fat-input"
|
id="trans_fat-input"
|
||||||
label="Fat (g)"
|
label="Trans Fat (g)"
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
id="carbs-input"
|
id="carbs-input"
|
||||||
label="Fat (g)"
|
label="Carbs (g)"
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
<br></br>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
id="fiber-input"
|
id="fiber-input"
|
||||||
label="Fat (g)"
|
label="Fiber (g)"
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
id="sugar-input"
|
id="sugar-input"
|
||||||
label="Fat (g)"
|
label="Sugar (g)"
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
id="protein-input"
|
id="protein-input"
|
||||||
label="Fat (g)"
|
label="Protein (g)"
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
id="sodium-input"
|
id="sodium-input"
|
||||||
label="Fat (g)"
|
label="Sodium (mg)"
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
id="potassium-input"
|
id="potassium-input"
|
||||||
label="Fat (g)"
|
label="Potassium (mg)"
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
<> </>
|
||||||
<TextField
|
<TextField
|
||||||
id="cholesterol-input"
|
id="cholesterol-input"
|
||||||
label="Fat (g)"
|
label="Cholesterol (mg)"
|
||||||
defaultValue="0"
|
size="small"
|
||||||
/>
|
/>
|
||||||
|
<br></br>
|
||||||
|
<br></br>
|
||||||
|
<> </>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
variant="contained"
|
||||||
|
size = "large">
|
||||||
|
Submit</Button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
<br></br>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2>
|
||||||
|
|
||||||
|
So Far This Week:
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2>
|
||||||
|
|
||||||
|
Add to Food Journal
|
||||||
|
</h2>
|
||||||
|
<h3>
|
||||||
|
On-Campus
|
||||||
|
</h3>
|
||||||
|
<h3>
|
||||||
|
Off-Campus
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user