fix: resolve TS2503 Cannot find namespace JSX in App.tsx
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 59s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 59s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import React from 'react';
|
||||
import { Routes, Route, Navigate, useLocation } from 'react-router-dom';
|
||||
import Layout from './components/Layout';
|
||||
import Dashboard from './pages/Dashboard';
|
||||
@@ -8,7 +9,7 @@ import ClientDetails from './pages/ClientDetails';
|
||||
import Login from './pages/Login';
|
||||
import { isAuthenticated } from './dataService';
|
||||
|
||||
function PrivateRoute({ children }: { children: JSX.Element }) {
|
||||
function PrivateRoute({ children }: { children: React.ReactNode }) {
|
||||
const location = useLocation();
|
||||
if (!isAuthenticated()) {
|
||||
return <Navigate to="/login" state={{ from: location }} replace />;
|
||||
|
||||
Reference in New Issue
Block a user