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