Skip to content

Commit

Permalink
Completed Sprint task -- renamed all "Register" items to "SignUp"
Browse files Browse the repository at this point in the history
Co-authored-by: cherhchen <[email protected]>
  • Loading branch information
h0ethan04 and cherhchen committed Jan 16, 2024
1 parent 0dc1274 commit 7160c61
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 7 deletions.
29 changes: 26 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ 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 Register from './components/Authentication/register';
import SignUp from './components/Authentication/SignUp';
import Dashboard from './pages/Dashboard/Dashboard';
import ForgotPassword from './components/Authentication/ForgotPassword';
import EmailAction from './components/Authentication/EmailAction';
import AUTH_ROLES from './utils/auth_config';
import ProtectedRoute from './utils/ProtectedRoute';
import Catalog from './pages/Catalog/Catalog';
import PublishedSchedule from './pages/PublishedSchedule/PublishedSchedule';
import Playground from './pages/Playground/Playground';

const { ADMIN_ROLE, USER_ROLE } = AUTH_ROLES.AUTH_ROLES;

Expand All @@ -21,10 +24,10 @@ const App = () => {
<CookiesProvider>
<Router>
<Routes>
<Route exact path="/" element={<Login />} />
<Route exact path="/login" element={<Login />} />
<Route exact path="/logout" element={<Logout />} />
<Route exact path="/forgotpassword" element={<ForgotPassword />} />
<Route exact path="/register" element={<Register />} />
<Route exact path="/signUp" element={<SignUp />} />
<Route exact path="/emailAction" element={<EmailAction redirectPath="/" />} />
<Route
exact
Expand All @@ -37,6 +40,26 @@ const App = () => {
/>
}
/>
<Route
exact path="/catalog"
element={
<ProtectedRoute
Component={Catalog}
redirectPath="/"
roles={[ADMIN_ROLE, USER_ROLE]}
/>
}
/>
<Route exact path="/publishedSchedule"
element={
<ProtectedRoute
Component={PublishedSchedule}
redirectPath="/"
roles={[ADMIN_ROLE, USER_ROLE]}
/>
}
/>
<Route exact path="/playground" element={<Playground />}/>
</Routes>
</Router>
</CookiesProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { registerWithEmailAndPassword } from '../../utils/auth_utils';

const Register = () => {
const SignUp = () => {
const [email, setEmail] = useState();
const [password, setPassword] = useState();
const [checkPassword, setCheckPassword] = useState();
Expand Down Expand Up @@ -39,7 +39,7 @@ const Register = () => {

return (
<div>
<h2>Register</h2>
<h2>Sign Up</h2>
<form onSubmit={handleSubmit}>
<input type="text" onChange={({ target }) => setEmail(target.value)} placeholder="Email" />
<br />
Expand All @@ -57,7 +57,7 @@ const Register = () => {
type="password"
/>
<br />
<button type="submit">Register</button>
<button type="submit">Sign Up</button>
{/* <div className="login-buttons">
<button type="button" onClick={handleGoogleSignIn}>
<span>Sign Up With Google</span>
Expand All @@ -69,4 +69,4 @@ const Register = () => {
);
};

export default Register;
export default SignUp;
9 changes: 9 additions & 0 deletions src/pages/Catalog/Catalog.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const Catalog = () => {
return (
<div>
<h1>Catalog</h1>
</div>
);
};

export default Catalog;
9 changes: 9 additions & 0 deletions src/pages/Playground/Playground.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const Playground = () => {
return (
<div>
<h1>Playground</h1>
</div>
);
};

export default Playground;
11 changes: 11 additions & 0 deletions src/pages/PublishedSchedule/PublishedSchedule.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

const PublishedSchedule = () => {
return (
<div>
<h1>Published Schedule</h1>
</div>
)
}


export default PublishedSchedule;

0 comments on commit 7160c61

Please sign in to comment.