Skip to content

Commit

Permalink
add app bar to all pages
Browse files Browse the repository at this point in the history
  • Loading branch information
annacai44 committed Jan 14, 2025
1 parent ed3c02c commit a13ba06
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Account/Account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import React from 'react';
import { Box, Container, Typography, Button, Switch, Divider, Card, CardContent, IconButton } from '@mui/material';
import EditIcon from '@mui/icons-material/Edit';
import NavigationBar from '../NavigationBar/NavigationBar';
import AppBar from '../AppBar/AppBar';

function Account({userName, userEmail}) {
return (
<div>
<AppBar />
<Container maxWidth="xs" style={{ textAlign: 'center', paddingTop: '20px' }}>
{/* Title */}
<Typography variant="h4" style={{ fontWeight: 'bold', marginBottom: '10px' }}>
Expand Down
9 changes: 9 additions & 0 deletions src/components/AppBar/AppBar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.app-bar {
display: flex;
justify-content: center;
align-items: center;
color: white;
background-color: #4E2A84;
margin: 0 0 1.5rem 0;
height: 4rem;
}
12 changes: 12 additions & 0 deletions src/components/AppBar/AppBar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import "./AppBar.css"

function AppBar() {
return (
<div className="app-bar">
<h1>CourseBuddy</h1>
</div>
)
}

export default AppBar
2 changes: 2 additions & 0 deletions src/components/Feed/Feed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Container, Box, Stack } from '@mui/material';
import { collection, getDocs } from "firebase/firestore";
import {db} from "../../utilities/firebase";
import "./Feed.css";
import AppBar from '../AppBar/AppBar';

const fake_post = {
id: 1, // automatically assigned
Expand Down Expand Up @@ -48,6 +49,7 @@ function Feed() {

return (
<div>
<AppBar />
<Container maxWidth="sm">
<Box paddingBottom="30px">
<Stack spacing={3}>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Submission/Submission.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import React from 'react';
import { Stack, Button, Alert, Container, TextField, Rating, Typography } from '@mui/material';
import NavigationBar from '../NavigationBar/NavigationBar';
import AppBar from '../AppBar/AppBar';
import "./Submission.css";

// Firebase
Expand Down Expand Up @@ -49,6 +50,7 @@ function Submission({ userName }) {
return (

<div>
<AppBar />
<Container className="submission-page">
<Stack spacing={3}>
<TextField required id="title" label="Title" value={title} type='text' onChange={(e) => setTitle(e.target.value)} />
Expand Down

0 comments on commit a13ba06

Please sign in to comment.