Protect routes that need authentication

This commit is contained in:
Pijus Kamandulis
2024-10-09 21:24:51 +03:00
parent 253d13abd4
commit c05febd1f5
4 changed files with 67 additions and 14 deletions

View File

@@ -9,7 +9,7 @@ import CreateTicketForm from './components/CreateTicketForm';
const fibonacciSequence = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 100];
const route = getRouteApi('/estimate/session/$sessionId');
const route = getRouteApi('/_authenticated/estimate/session/$sessionId');
const Estimation: React.FC = () => {
const { sessionId } = route.useParams();

View File

@@ -12,7 +12,7 @@ import {
} from '../components';
import { useState } from 'react';
const route = getRouteApi('/');
const route = getRouteApi('/_authenticated/');
function Home() {
const user = useUser();