-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
863f7d8
commit 52ff9d7
Showing
10 changed files
with
803 additions
and
4,497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { useEffect, useRef } from "react"; | ||
|
||
import lottie from "lottie-web"; | ||
|
||
function Loading() { | ||
const animationContainer = useRef<HTMLDivElement | null>(null); | ||
|
||
useEffect(() => { | ||
if (animationContainer.current) { | ||
lottie | ||
.loadAnimation({ | ||
container: animationContainer.current, | ||
// @ts-ignore | ||
animationData: require("../animation/loading.json"), | ||
autoplay: true, | ||
loop: true, | ||
renderer: "svg", | ||
}) | ||
.play(); | ||
} | ||
}, []); | ||
|
||
return ( | ||
<div className="container"> | ||
<div className="animation-container" ref={animationContainer} /> | ||
</div> | ||
); | ||
} | ||
|
||
export default Loading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,46 @@ | ||
import { Menu as MenuIcon } from "@mui/icons-material"; | ||
import { Box, AppBar, Toolbar, Typography, IconButton } from "@mui/material"; | ||
import MenuIcon from "@mui/icons-material/Menu"; | ||
import Box from "@mui/material/Box"; | ||
import AppBar from "@mui/material/AppBar"; | ||
import Typography from "@mui/material/Typography"; | ||
import IconButton from "@mui/material/IconButton"; | ||
import Toolbar from "@mui/material/Toolbar"; | ||
|
||
import AccountMenu from "./AccountMenu"; | ||
import SelectAppTheme from "./SelectAppTheme"; | ||
import { useAuth } from "../context/AuthContext"; | ||
import { useDrawer } from "../context/DrawerContext"; | ||
|
||
function MenuAppBar() { | ||
const { user } = useAuth(); | ||
const { isDrawerOpen, setDrawerIsOpen } = useDrawer(); | ||
const { user } = useAuth(); | ||
const { isDrawerOpen, setDrawerIsOpen } = useDrawer(); | ||
|
||
return ( | ||
<Box sx={{ flexGrow: 1 }}> | ||
<AppBar position="fixed"> | ||
<Toolbar> | ||
{user && ( | ||
<IconButton | ||
size="large" | ||
edge="start" | ||
color="inherit" | ||
aria-label="menu" | ||
sx={{ mr: 2 }} | ||
onClick={() => { | ||
setDrawerIsOpen(!isDrawerOpen); | ||
}} | ||
> | ||
<MenuIcon /> | ||
</IconButton> | ||
)} | ||
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}> | ||
Notes | ||
</Typography> | ||
{user ? <AccountMenu /> : null} | ||
<SelectAppTheme /> | ||
</Toolbar> | ||
</AppBar> | ||
</Box> | ||
); | ||
return ( | ||
<Box sx={{ flexGrow: 1 }}> | ||
<AppBar position="fixed"> | ||
<Toolbar> | ||
{user && ( | ||
<IconButton | ||
size="large" | ||
edge="start" | ||
color="inherit" | ||
aria-label="menu" | ||
sx={{ mr: 2 }} | ||
onClick={() => { | ||
setDrawerIsOpen(!isDrawerOpen); | ||
}} | ||
> | ||
<MenuIcon /> | ||
</IconButton> | ||
)} | ||
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}> | ||
Notes | ||
</Typography> | ||
{user ? <AccountMenu /> : null} | ||
<SelectAppTheme /> | ||
</Toolbar> | ||
</AppBar> | ||
</Box> | ||
); | ||
} | ||
|
||
export default MenuAppBar; |
Oops, something went wrong.