diff --git a/client/package-lock.json b/client/package-lock.json index f97cf03..8568aff 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,5 +1,5 @@ { - "name": "team-6", + "name": "TaskBlaster", "version": "0.1.0", "lockfileVersion": 1, "requires": true, diff --git a/client/package.json b/client/package.json index 6c07d9b..bd6b8c5 100644 --- a/client/package.json +++ b/client/package.json @@ -1,5 +1,5 @@ { - "name": "team-6", + "name": "TaskBlaster", "version": "0.1.0", "private": true, "dependencies": { @@ -10,7 +10,6 @@ "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.5.0", "@testing-library/user-event": "^7.2.1", - "axios": "^0.19.2", "date-fns": "^2.12.0", "react": "^16.13.1", "react-dom": "^16.13.1", diff --git a/client/public/favicon.ico b/client/public/favicon.ico index bcd5dfd..0aa3627 100644 Binary files a/client/public/favicon.ico and b/client/public/favicon.ico differ diff --git a/client/public/logo192.png b/client/public/logo192.png index fc44b0a..b1f940d 100644 Binary files a/client/public/logo192.png and b/client/public/logo192.png differ diff --git a/client/public/logo512.png b/client/public/logo512.png index a4e47a6..f8a43ec 100644 Binary files a/client/public/logo512.png and b/client/public/logo512.png differ diff --git a/client/public/manifest.json b/client/public/manifest.json index 080d6c7..23fad9f 100644 --- a/client/public/manifest.json +++ b/client/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "React App", - "name": "Create React App Sample", + "short_name": "TaskBlaster", + "name": "TaskBlaster Project Management Tool", "icons": [ { "src": "favicon.ico", diff --git a/client/src/api/TaskAPI.js b/client/src/api/TaskAPI.js index 6e136ab..ce55ba4 100644 --- a/client/src/api/TaskAPI.js +++ b/client/src/api/TaskAPI.js @@ -9,8 +9,11 @@ const HEADERS = { class TaskAPI { - async getAllTasks(removeTask) { - const responseJson = await (await fetch(`${API_URL}/tasks`)).json(); + async getAllTasks(removeTask) { + const response = await fetch(`${API_URL}/tasks`); + console.log(`GET: ${response.status}`); + const responseJson = await response.json(); + var taskComponents = []; for (let [key, taskData] of Object.entries(responseJson)) { taskComponents[key] = diff --git a/client/src/components/Appbar.js b/client/src/components/Appbar.js index 2d2ebff..e114593 100644 --- a/client/src/components/Appbar.js +++ b/client/src/components/Appbar.js @@ -15,6 +15,8 @@ import Grid from '@material-ui/core/Grid'; import { makeStyles, useTheme } from '@material-ui/core/styles'; import { MenuList, MenuItem } from '@material-ui/core'; import { Link } from 'react-router-dom'; +import * as logo from '../images/logo_no_bg.png'; +import { withRouter } from "react-router-dom" const drawerWidth = 240; @@ -60,14 +62,36 @@ const useStyles = makeStyles((theme) => ({ }, button: { color: "white", + }, + logo: { + height: "auto", + width: "auto", + maxHeight: "64px", + maxWidth: "250px", + paddingTop: "8px" } })); -export default function Appbar() { +function Appbar(props) { const classes = useStyles(); const theme = useTheme(); const [open, setOpen] = React.useState(false); + const changeTitle = () => { + switch(window.location.pathname) { + case '/': + return 'Home'; + case '/tasks': + return 'My Tasks'; + case '/login': + return 'Login'; + case '/signup': + return 'Sign Up'; + default: + return 'Home'; + } + } + const handleDrawerOpen = () => { setOpen(true); }; @@ -75,9 +99,8 @@ export default function Appbar() { const handleDrawerClose = () => { setOpen(false); }; - - // TODO: - // Return different appbars for unauthenticated and authenticated + + let title = changeTitle(); return (