mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-22 19:40:14 -04:00
Handle staples recipe links appropriately
This commit is contained in:
parent
66a558d1e6
commit
0404ba59f4
@ -55,8 +55,13 @@ fn CategoryRow<'ctx, G: Html>(cx: Scope<'ctx>, props: CategoryRowProps<'ctx>) ->
|
||||
iterable=recipes,
|
||||
view=|cx, r| {
|
||||
let recipe_name = r.clone();
|
||||
let href = if recipe_name == "Staples" {
|
||||
"/ui/manage/staples".to_owned()
|
||||
} else {
|
||||
format!("/ui/recipe/edit/{}", r)
|
||||
};
|
||||
view!{cx,
|
||||
a(href=format!("/ui/recipe/edit/{}", r)) { (recipe_name) } br()
|
||||
a(href=href) { (recipe_name) } br()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user