add env var to remove user registration

This commit is contained in:
Romulus21
2024-03-04 17:17:46 +01:00
parent 6dd147c3e2
commit 6609738650
6 changed files with 25 additions and 6 deletions

View File

@@ -9,10 +9,10 @@ import useAuthUser from "../hooks/AuthUser"
import Register from "./Auth/Register"
import ToDoShow from "./ToDos/ToDoShow"
import TimeTrackersIndex from "./TimeTrackersIndex"
import {env} from "../utilities/env"
const Router = () => {
console.log('router')
const {loadingAuthUser} = useAuthUser()
return <>
@@ -24,7 +24,7 @@ const Router = () => {
<Route path="/" element={<Home />} />
<Route path="/profile" element={<Profile />} />
<Route path="/connexion" element={<Login />} />
<Route path="/inscription" element={<Register />} />
{env.VITE_REGISTER_DISABLED === 'false' && <Route path="/sinscrire" element={<Register />} />}
<Route path="/todos/:id" element={<ToDoShow />} />
<Route path="/times" element={<TimeTrackersIndex />} />
</Routes>