add alisurvey main page
This commit is contained in:
23
products/react-apps/alisurvey/src/App.tsx
Normal file
23
products/react-apps/alisurvey/src/App.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user