diff --git a/client/src/components/Chart.jsx b/client/src/components/Chart.jsx index cf34ab1..1df1ca4 100644 --- a/client/src/components/Chart.jsx +++ b/client/src/components/Chart.jsx @@ -2,7 +2,7 @@ import React, { useEffect, useState, useContext } from 'react'; import BackButton from "./BackButton.jsx"; import { auth, onAuthStateChanged } from "../config/initializeFirestore.js"; import '../App.css'; -import HamburgerMenu from "./HamburgerMenu.jsx"; +import HamburgerMenuEdit from "./HamburgerMenuEdit.jsx"; import { AppContext } from '../context/AppContext.jsx'; import ExpenseChartJoyride from './ExpenseChartJoyride.jsx'; @@ -47,7 +47,7 @@ function App() {
< ExpenseChartJoyride />

SimpliTrac

- +
diff --git a/client/src/components/EditTransactionsPage.jsx b/client/src/components/EditTransactionsPage.jsx index f07599f..5c48198 100644 --- a/client/src/components/EditTransactionsPage.jsx +++ b/client/src/components/EditTransactionsPage.jsx @@ -7,7 +7,8 @@ import BackButton from "./BackButton.jsx"; import '../App.css'; import { Button } from "@chakra-ui/react"; import EditTransactionsJoyride from './EditTransactionJoyride.jsx'; -import HamburgerMenu from "./HamburgerMenu.jsx"; +import HamburgerMenuEdit from "./HamburgerMenuEdit.jsx"; +import { Spinner } from "react-bootstrap"; const EditTransactionsPage = () => { const { user, setUser, setScreen, setServerResponse, runEditTransactionsTour, setRunEditTransactionsTour } = useContext(AppContext); @@ -94,8 +95,9 @@ const EditTransactionsPage = () => { return ( <> - + +
diff --git a/client/src/components/HamburgerMenuEdit.jsx b/client/src/components/HamburgerMenuEdit.jsx new file mode 100644 index 0000000..8ee4dd9 --- /dev/null +++ b/client/src/components/HamburgerMenuEdit.jsx @@ -0,0 +1,121 @@ +import React, {useContext, useEffect} from 'react'; +import { + Drawer, + DrawerBody, + DrawerHeader, + DrawerOverlay, + DrawerContent, + DrawerCloseButton, + IconButton, + VStack, + useDisclosure, + Button, + Text +} from "@chakra-ui/react"; +import {HamburgerIcon} from "@chakra-ui/icons"; +import {AppContext} from '../context/AppContext.jsx'; +import SignOut from "./SignOut.jsx"; + +// const HamburgerMenu = ({setRunTour}) => { +const HamburgerMenuEdit = () => { + const { + showHamburger, + setShowHamburger, + renderNewScreen, + showCategories, + toggleCategoriesList, + user, + setRunTour, + setRunChartTour + } = useContext(AppContext); + const {isOpen, onOpen, onClose} = useDisclosure(); + + useEffect(() => { + if (showHamburger) { + onOpen(); + } else { + onClose(); + } + }, [showHamburger, onOpen, onClose]); + + const startTour = () => { + setShowHamburger(false); + setRunTour(true); + }; + + return ( + <> + } + onClick={() => setShowHamburger(true)} + display={{base: "block", md: "block"}} + position="fixed" + background="#415a77" + top="20px" + left="20px" + zIndex="1000" + colorScheme="teal" + /> + + setShowHamburger(false)} isOpen={isOpen}> + + + + Menu + + + + Welcome {user.first_name} + + {/* */} + + {/* */} + + + + + + + + + ); +}; + +export default HamburgerMenuEdit; \ No newline at end of file