mirror of
http://88.130.71.182:3000/BlitTech/Projet1-RealEstate.git
synced 2026-06-12 23:33:21 +00:00
Update App.tsx
This commit is contained in:
@@ -12,9 +12,6 @@ import { AuthProvider, useAuth } from './contexts/AuthContext';
|
|||||||
import { ListingProvider } from './contexts/ListingContext';
|
import { ListingProvider } from './contexts/ListingContext';
|
||||||
import Register from './pages/Register';
|
import Register from './pages/Register';
|
||||||
|
|
||||||
//register button route
|
|
||||||
<Route path="/register" element={<Register />} />
|
|
||||||
|
|
||||||
// Protected route component
|
// Protected route component
|
||||||
const ProtectedRoute: React.FC<{
|
const ProtectedRoute: React.FC<{
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
@@ -62,6 +59,9 @@ function App() {
|
|||||||
<Route path="/listings/:id" element={<MainLayout><ListingDetail /></MainLayout>} />
|
<Route path="/listings/:id" element={<MainLayout><ListingDetail /></MainLayout>} />
|
||||||
<Route path="/login" element={<Login />} />
|
<Route path="/login" element={<Login />} />
|
||||||
|
|
||||||
|
{/* ADD THIS LINE - The fix for your button */}
|
||||||
|
<Route path="/register" element={<Register />} />
|
||||||
|
|
||||||
{/* Protected admin routes */}
|
{/* Protected admin routes */}
|
||||||
<Route
|
<Route
|
||||||
path="/admin/dashboard"
|
path="/admin/dashboard"
|
||||||
|
|||||||
Reference in New Issue
Block a user