-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: set the routes and the base structure for the auth
- Loading branch information
1 parent
bcefc53
commit 050683b
Showing
4 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import Home from './pages/home'; | ||
import { Routes as ReactRoutes, Route } from 'react-router'; | ||
|
||
export enum PublicRoutesEnum { | ||
Home = '/', | ||
} | ||
|
||
export enum AuthRoutesEnum { | ||
Login = '/login', | ||
SignUp = '/signup', | ||
Welcome = '/welcome', | ||
} | ||
|
||
export enum PrivateRoutesEnum {} | ||
|
||
export function Routes() { | ||
return ( | ||
<ReactRoutes> | ||
{/* {user ? PrivateRoutes.map((route) => route) : AuthRoutes.map((route) => route)} */} | ||
{PublicRoutes.map((route) => route)} | ||
</ReactRoutes> | ||
); | ||
} | ||
|
||
const _PrivateRoutes: JSX.Element[] = []; | ||
|
||
const _AuthRoutes: JSX.Element[] = []; | ||
|
||
const PublicRoutes = [ | ||
<Route | ||
key={PublicRoutesEnum.Home} | ||
path={PublicRoutesEnum.Home} | ||
Component={Home} | ||
/>, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function Home() { | ||
return ( | ||
<> | ||
<h1 className="text-black text-4xl">Home</h1> | ||
</> | ||
); | ||
} |