add feature to edit recipes
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user