centralize all routes
This commit is contained in:
parent
5726bdb154
commit
a10f3e37c2
5 changed files with 53 additions and 24 deletions
|
|
@ -2,6 +2,7 @@ import { useParams, Link } from "react-router-dom"
|
|||
import type { Recipe } from "../../types/recipe"
|
||||
import { useEffect, useState } from "react"
|
||||
import { fetchRecipe } from "../../api/recipePoint"
|
||||
import { getRecipeEditUrl, getRecipeListUrl } from "../../routes"
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -123,13 +124,13 @@ export default function RecipeDetailPage() {
|
|||
{/* Action buttons */}
|
||||
<div className="button-group">
|
||||
<Link
|
||||
to={`/recipe/${recipe.id}/edit`}
|
||||
to={ getRecipeEditUrl(recipe.id) }
|
||||
className="primary-button"
|
||||
>
|
||||
Bearbeiten
|
||||
</Link>
|
||||
<Link
|
||||
to="/"
|
||||
to={getRecipeListUrl()}
|
||||
className="default-button"
|
||||
>
|
||||
Zurueck
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue