add feature for users to create and store recipes

This commit is contained in:
2025-08-10 13:52:45 +01:00
parent a53c50b8b4
commit 1d2fa1bf02
7 changed files with 779 additions and 9 deletions

View File

@@ -4,6 +4,7 @@ import { AuthProvider, useAuth } from './context/AuthContext';
import Dashboard from './pages/Dashboard';
import Login from './pages/Login';
import Register from './pages/Register';
import CreateRecipe from './pages/CreateRecipe';
import './App.css';
// Protected Route component
@@ -101,6 +102,14 @@ function App() {
</PublicRoute>
}
/>
<Route
path="/create-recipe"
element={
<ProtectedRoute>
<CreateRecipe />
</ProtectedRoute>
}
/>
<Route path="*" element={<Navigate to="/" />} />
</Routes>
</div>