Update App.tsx

This commit is contained in:
Dosseh91
2025-06-23 20:23:20 +02:00
committed by GitHub
parent 558995b275
commit affe468a49

View File

@@ -12,9 +12,6 @@ import { AuthProvider, useAuth } from './contexts/AuthContext';
import { ListingProvider } from './contexts/ListingContext';
import Register from './pages/Register';
//register button route
<Route path="/register" element={<Register />} />
// Protected route component
const ProtectedRoute: React.FC<{
children: React.ReactNode;
@@ -62,6 +59,9 @@ function App() {
<Route path="/listings/:id" element={<MainLayout><ListingDetail /></MainLayout>} />
<Route path="/login" element={<Login />} />
{/* ADD THIS LINE - The fix for your button */}
<Route path="/register" element={<Register />} />
{/* Protected admin routes */}
<Route
path="/admin/dashboard"