Skip to content

Commit

Permalink
use global nav bar layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Liz Johnson committed Sep 17, 2023
1 parent 236bd4b commit 9219e5f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 28 deletions.
10 changes: 9 additions & 1 deletion frontend/src/components/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import Navbar from './Navbar'
import {AppBar, Toolbar } from "@mui/material";

export default function Layout({ children }) {
return (
<>
<Navbar/>
<AppBar position="static" sx={{ bgcolor: "pink" }}>
<section aria-label={"toolbar-section"}
style={{display: "flex", flexDirection: "row", justifyContent: "right"}}>
<Toolbar>
<Navbar/>
</Toolbar>
</section>
</AppBar>
<main>{children}</main>
</>
)
Expand Down
9 changes: 0 additions & 9 deletions frontend/src/pages/Participants.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import ParticipantsList from "../components/ParticipantsList";
import {AppBar, Toolbar } from "@mui/material";
import Navbar from "../components/Navbar";
import type {NextPage} from 'next';

export const Participants: NextPage = () => {
return (
<>
<AppBar position="static" sx={{ bgcolor: "pink" }}>
<section aria-label={"toolbar-section"}
style={{display: "flex", flexDirection: "row", justifyContent: "right"}}>
<Toolbar>
<Navbar/>
</Toolbar>
</section>
</AppBar>
<section aria-label={"participants-section"}
style={{
padding: "40px 30px",
Expand Down
9 changes: 0 additions & 9 deletions frontend/src/pages/Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Box from '@mui/material/Box';
import {AppBar, Toolbar } from "@mui/material";
import useUsers from "../hooks/useUsers";
import type {NextPage} from 'next';
import Navbar from "../components/Navbar";
import {Typography} from "@material-ui/core";

export const Users: NextPage = () => {
Expand All @@ -27,14 +26,6 @@ export const Users: NextPage = () => {

return (
<div>
<AppBar position="static" sx={{ bgcolor: "pink" }}>
<section aria-label={"toolbar-section"}
style={{display: "flex", flexDirection: "row", justifyContent: "right"}}>
<Toolbar>
<Navbar/>
</Toolbar>
</section>
</AppBar>
<section aria-label={"participants-section"}
style={{
padding: "40px 30px",
Expand Down
9 changes: 0 additions & 9 deletions frontend/src/pages/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Box from '@mui/material/Box';
import {AppBar, Toolbar } from "@mui/material";
import useUsers from "../hooks/useUsers";
import type {NextPage} from 'next';
import Navbar from "../components/Navbar";
import ParticipantsList from "../components/ParticipantsList";
import {Typography} from "@material-ui/core";

Expand All @@ -28,14 +27,6 @@ export const Welcome: NextPage = () => {

return (
<div>
<AppBar position="static" sx={{ bgcolor: "pink" }}>
<section aria-label={"toolbar-section"}
style={{display: "flex", flexDirection: "row", justifyContent: "right"}}>
<Toolbar>
<Navbar/>
</Toolbar>
</section>
</AppBar>
<section aria-label={"participants-section"}
style={{
padding: "40px 30px",
Expand Down

0 comments on commit 9219e5f

Please sign in to comment.