initial commit
This commit is contained in:
commit
ee8aedd857
1599 changed files with 652440 additions and 0 deletions
27
frontend/src/App.tsx
Normal file
27
frontend/src/App.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { BrowserRouter as Router, Routes, Route } from "react-router-dom"
|
||||
import RecipeListView from "./components/RecipeListView"
|
||||
import RecipeDetailView from "./components/RecipeDetailView"
|
||||
import RecipeEditView from "./components/RecipeEditView"
|
||||
|
||||
/**
|
||||
* Main application component.
|
||||
* Defines routes for the recipe list, detail view, and edit form.
|
||||
*/
|
||||
function App() {
|
||||
return (
|
||||
<Router>
|
||||
<Routes>
|
||||
{/* Home page: list of recipes */}
|
||||
<Route path="/" element={<RecipeListView />} />
|
||||
|
||||
{/* Detail page: shows one recipe */}
|
||||
<Route path="/recipe/:id" element={<RecipeDetailView />} />
|
||||
|
||||
{/* Edit page: form to edit a recipe */}
|
||||
<Route path="/recipe/:id/edit" element={<RecipeEditView />} />
|
||||
</Routes>
|
||||
</Router>
|
||||
)
|
||||
}
|
||||
|
||||
export default App
|
||||
Loading…
Add table
Add a link
Reference in a new issue