diff --git a/client/src/constants/routes.ts b/client/src/constants/routes.ts new file mode 100644 index 0000000..b9b2344 --- /dev/null +++ b/client/src/constants/routes.ts @@ -0,0 +1,7 @@ +export const HOME: string = "/"; +export const PROJECTS: string = "/projects"; +export const TICKETS: string = "/tickets"; +export const USERS: string = "/users"; +export const SIGN_IN: string = "/signin"; +export const NOT_FOUND: string = "/404"; +export const TEST: string = "/test"; diff --git a/client/src/pages/HomePage.tsx b/client/src/pages/HomePage.tsx index a7981e8..15c753c 100644 --- a/client/src/pages/HomePage.tsx +++ b/client/src/pages/HomePage.tsx @@ -2,24 +2,10 @@ import React, { FC } from "react"; // import { LogInForm } from "../components/LogInForm"; // import { ProfileSelector } from "../components/ProfileSelector"; import SignInSide from "../components/SignInSide"; +import { useAuth0 } from "../authentication/auth0"; const HomePage: FC = () => { - return ( - //
- //
- //

Ticket Manager

- //
- //
- // - //
- //
- // - //
- //
- //
- //
- - ); + return
HomePage
; }; export default HomePage; diff --git a/client/src/pages/SigninPage.tsx b/client/src/pages/SigninPage.tsx new file mode 100644 index 0000000..c6215b8 --- /dev/null +++ b/client/src/pages/SigninPage.tsx @@ -0,0 +1,20 @@ +import React, { FC } from "react"; +import SignInSide from "../components/SignInSide"; +import { useAuth0 } from "../authentication/auth0"; +import { Redirect } from "react-router-dom"; +import * as ROUTES from "../constants/routes"; + +const SigninPage: FC = () => { + const { isAuthenticated, user } = useAuth0(); + + if (isAuthenticated) { + // retrieve userId + const { sub } = user; + const uid = sub.split("|")[1]; + return ; + } else { + return ; + } +}; + +export default SigninPage;