mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-06 00:36:39 +00:00
home page layout
This commit is contained in:
parent
cf9c80f6b1
commit
17f67ccebf
4 changed files with 17 additions and 3 deletions
BIN
app.db
BIN
app.db
Binary file not shown.
1
client/src/images/real_time_collaboration.svg
Normal file
1
client/src/images/real_time_collaboration.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 26 KiB |
|
|
@ -1,7 +1,20 @@
|
|||
import React, { FC } from "react";
|
||||
import { Redirect } from "react-router-dom";
|
||||
import SignInSide from "../components/SignInSide";
|
||||
import { useAuth0 } from "../authentication/auth0";
|
||||
import { getUID } from "../authentication/helpers";
|
||||
import * as ROUTES from "../constants/routes";
|
||||
|
||||
const HomePage: FC = () => {
|
||||
return <div>HomePage</div>;
|
||||
const { isAuthenticated, user } = useAuth0();
|
||||
|
||||
if (isAuthenticated) {
|
||||
// retrieve userId
|
||||
const uid = getUID(user);
|
||||
return <Redirect to={`${ROUTES.USERS}/${uid}`} />;
|
||||
} else {
|
||||
return <SignInSide />;
|
||||
}
|
||||
};
|
||||
|
||||
export default HomePage;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import UserController from "../controllers/UserController";
|
|||
import TicketController from "../controllers/TicketController";
|
||||
import NotFoundPage from "../pages/NotFoundPage";
|
||||
import TestPage from "../pages/TestPage";
|
||||
import SigninPage from "../pages/SigninPage";
|
||||
// import SigninPage from "../pages/SigninPage";
|
||||
import * as ROUTES from "../constants/routes";
|
||||
|
||||
const AppRouter = () => {
|
||||
|
|
@ -15,7 +15,7 @@ const AppRouter = () => {
|
|||
<Switch>
|
||||
<PrivateRoute path={ROUTES.TEST} component={TestPage} />
|
||||
<Route exact path={ROUTES.HOME} component={HomeController} />
|
||||
<Route path={ROUTES.SIGN_IN} component={SigninPage} />
|
||||
{/* <Route path={ROUTES.SIGN_IN} component={SigninPage} /> */}
|
||||
<PrivateRoute
|
||||
path={`${ROUTES.PROJECTS}/:id`}
|
||||
component={ProjectController}
|
||||
|
|
|
|||
Loading…
Reference in a new issue