From 9b0fb61012ff4a23e3d553b9e6892339dca9fa82 Mon Sep 17 00:00:00 2001 From: michellelin1 Date: Sun, 21 Jan 2024 16:00:10 -0800 Subject: [PATCH] changed dashboard to notifications --- src/App.jsx | 10 ++++------ src/components/Authentication/Login.jsx | 2 +- src/components/Authentication/Logout.jsx | 2 +- .../Dashboard.jsx => Notifications/Notifications.jsx} | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) rename src/pages/{Dashboard/Dashboard.jsx => Notifications/Notifications.jsx} (52%) diff --git a/src/App.jsx b/src/App.jsx index 1577d9a..f0ffa25 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,12 +1,11 @@ import './App.css'; -import EmailSending from './components/EmailTemplates/EmailSending'; -import { ChakraProvider, Text } from '@chakra-ui/react' +import { ChakraProvider } from '@chakra-ui/react' import { Route, Routes, BrowserRouter as Router } from 'react-router-dom'; import { CookiesProvider } from 'react-cookie'; import Login from './components/Authentication/Login'; import Logout from './components/Authentication/Logout'; import SignUp from './components/Authentication/SignUp'; -import Dashboard from './pages/Dashboard/Dashboard'; +import Notifications from './pages/Notifications/Notifications'; import ForgotPassword from './components/Authentication/ForgotPassword'; import EmailAction from './components/Authentication/EmailAction'; import AUTH_ROLES from './utils/auth_config'; @@ -20,7 +19,6 @@ const { ADMIN_ROLE, USER_ROLE } = AUTH_ROLES.AUTH_ROLES; const App = () => { return ( - @@ -41,10 +39,10 @@ const App = () => { } /> diff --git a/src/components/Authentication/Login.jsx b/src/components/Authentication/Login.jsx index dbdc913..def5540 100644 --- a/src/components/Authentication/Login.jsx +++ b/src/components/Authentication/Login.jsx @@ -13,7 +13,7 @@ const Login = ({ cookies }) => { const handleStdLogin = async e => { try { e.preventDefault(); - await logInWithEmailAndPassword(email, password, '/dashboard', navigate, cookies); + await logInWithEmailAndPassword(email, password, '/publishedSchedule', navigate, cookies); } catch (err) { setErrorMessage(err.message); } diff --git a/src/components/Authentication/Logout.jsx b/src/components/Authentication/Logout.jsx index bf5cf20..1115568 100644 --- a/src/components/Authentication/Logout.jsx +++ b/src/components/Authentication/Logout.jsx @@ -9,7 +9,7 @@ const Logout = ({ cookies }) => { const handleLogout = async () => { try { - await logout('/', navigate, cookies); + await logout('/login', navigate, cookies); } catch (err) { setErrorMessage(err.message); } diff --git a/src/pages/Dashboard/Dashboard.jsx b/src/pages/Notifications/Notifications.jsx similarity index 52% rename from src/pages/Dashboard/Dashboard.jsx rename to src/pages/Notifications/Notifications.jsx index 9f49fb5..f98f594 100644 --- a/src/pages/Dashboard/Dashboard.jsx +++ b/src/pages/Notifications/Notifications.jsx @@ -1,4 +1,4 @@ -const Dashboard = () => { +const Notifications = () => { return (

Dashboard

@@ -6,4 +6,4 @@ const Dashboard = () => { ); }; -export default Dashboard; +export default Notifications;