implement basic login
This commit is contained in:
parent
bdd90b50d9
commit
7a6f5b5bcd
18 changed files with 222 additions and 35 deletions
|
|
@ -2,9 +2,10 @@ import { BrowserRouter as Router, Routes, Route } from "react-router-dom"
|
|||
import RecipeDetailPage from "./components/recipes/RecipeDetailPage"
|
||||
import RecipeEditPage from "./components/recipes/RecipeEditPage"
|
||||
import RecipeListPage from "./components/recipes/RecipeListPage"
|
||||
import { getRecipeAddUrlDefinition, getRecipeDetailsUrlDefinition, getRecipeEditUrlDefinition, getRootUrlDefinition } from "./routes"
|
||||
import { getLoginUrl, getRecipeAddUrlDefinition, getRecipeDetailsUrlDefinition, getRecipeEditUrlDefinition, getRecipeListUrlDefinition, getRootUrlDefinition } from "./routes"
|
||||
|
||||
import "./App.css"
|
||||
import LoginPage from "./components/LoginPage"
|
||||
|
||||
/**
|
||||
* Main application component.
|
||||
|
|
@ -14,8 +15,10 @@ function App() {
|
|||
return (
|
||||
<Router>
|
||||
<Routes>
|
||||
{/* Login page */}
|
||||
<Route path={getLoginUrl()} element={<LoginPage/>}/>
|
||||
{/* Home page: list of recipes */}
|
||||
<Route path= {getRootUrlDefinition()} element={<RecipeListPage />} />
|
||||
<Route path= {getRecipeListUrlDefinition()} element={<RecipeListPage />} />
|
||||
|
||||
{/* Detail page: shows one recipe */}
|
||||
<Route path={getRecipeDetailsUrlDefinition()} element={<RecipeDetailPage />} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue