24 lines
659 B
TypeScript
24 lines
659 B
TypeScript
import { Routes, Route } from "react-router-dom";
|
|
import Home from "@/pages/Home";
|
|
import { useState } from "react";
|
|
import { AuthContext } from '@/contexts/authContext';
|
|
|
|
export default function App() {
|
|
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
|
|
|
const logout = () => {
|
|
setIsAuthenticated(false);
|
|
};
|
|
|
|
return (
|
|
<AuthContext.Provider
|
|
value={{ isAuthenticated, setIsAuthenticated, logout }}
|
|
>
|
|
<Routes>
|
|
<Route path="/" element={<Home />} />
|
|
<Route path="/other" element={<div className="text-center text-xl">Other Page - Coming Soon</div>} />
|
|
</Routes>
|
|
</AuthContext.Provider>
|
|
);
|
|
}
|