diff --git a/src/pages/Grains.tsx b/src/pages/Grains.tsx index 6d5fba8..2b6b227 100644 --- a/src/pages/Grains.tsx +++ b/src/pages/Grains.tsx @@ -1,11 +1,16 @@ import { useState } from "react"; import PageContainer from "./PageContainer"; import CustomGrainForm from "grain/CustomGrainForm"; -import { Button } from "@mui/material"; +import { Box, Button, Grid2, Typography } from "@mui/material"; import { pond } from "protobuf-ts/pond"; +import ButtonGroup from "common/ButtonGroup"; +import { useMobile } from "hooks"; export default function Grains() { const [currentCustomGrain, setCurrentCustomGrain] = useState() + const [displayCustom, setDisplayCustom] = useState(false) + const [grainTableData, setGrainTableData] = useState() + const isMobile = useMobile() //function to load the first set of custom grains const loadCustomGrain = () => {} @@ -16,20 +21,72 @@ export default function Grains() { const grainTab = () => {} //table that will display the grains (both for the supported grain and custom for the user) - const grainTable = () => {} + const grainTable = () => { + + } //the grain display for supported grain type to show the rest of the data such as what constants are used in the formula - const supportedDisplay = () => {} + const supportedDisplay = () => { + return ( + + ) + } //the grain display for custom grain the user has defined - const customGrainDisplay = () => {} + const customGrainDisplay = () => { + return ( + + {}}/> + + ) + } + + const desktopView = () => { + return ( + + + + + + {displayCustom ? customGrainDisplay() : supportedDisplay()} + + + ) + } + + const mobileView = () => { + return ( + + ) + } return ( - GRAIN PAGE - {}}/> - - + + GRAIN PAGE + + + { + setDisplayCustom(false) + } + }, + { + title: "Custom", + function: () => { + setDisplayCustom(true) + } + } + ]} + /> + + {!isMobile ? desktopView() : mobileView()} + {/* + */} ) } \ No newline at end of file