add feature to edit recipes

This commit is contained in:
2025-08-10 14:38:04 +01:00
parent 85138a6575
commit 7c0907a109
7 changed files with 592 additions and 30 deletions

View File

@@ -5,6 +5,7 @@ import Dashboard from './pages/Dashboard';
import Login from './pages/Login';
import Register from './pages/Register';
import CreateRecipe from './pages/CreateRecipe';
import EditRecipe from './pages/EditRecipe';
import './App.css';
// Protected Route component
@@ -110,6 +111,14 @@ function App() {
</ProtectedRoute>
}
/>
<Route
path="/edit-recipe/:id"
element={
<ProtectedRoute>
<EditRecipe />
</ProtectedRoute>
}
/>
<Route path="*" element={<Navigate to="/" />} />
</Routes>
</div>