Skip to content

Commit

Permalink
changed dashboard to notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
michellelin1 committed Jan 22, 2024
1 parent 4e3ce3b commit 9b0fb61
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
10 changes: 4 additions & 6 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -20,7 +19,6 @@ const { ADMIN_ROLE, USER_ROLE } = AUTH_ROLES.AUTH_ROLES;
const App = () => {
return (
<ChakraProvider>
<EmailSending />
<CookiesProvider>
<Router>
<Routes>
Expand All @@ -41,10 +39,10 @@ const App = () => {
<Route exact path="/emailAction" element={<EmailAction redirectPath="/" />} />
<Route
exact
path="/dashboard"
path="/notifictions"
element={
<ProtectedRoute
Component={Dashboard}
Component={Notifications}
redirectPath="/login"
roles={[ADMIN_ROLE, USER_ROLE]}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Authentication/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Authentication/Logout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const Dashboard = () => {
const Notifications = () => {
return (
<div>
<h1>Dashboard</h1>
</div>
);
};

export default Dashboard;
export default Notifications;

0 comments on commit 9b0fb61

Please sign in to comment.