Add the lang prefix to all links
This commit is contained in:
parent
b39cb1c067
commit
3089ede6eb
7 changed files with 40 additions and 11 deletions
|
|
@ -16,7 +16,7 @@ use web_sys::{
|
|||
use crate::{
|
||||
modal_dialog, request,
|
||||
toast::{self, Level},
|
||||
utils::{SelectorExt, by_id, selector, selector_and_clone},
|
||||
utils::{SelectorExt, by_id, get_current_lang, selector, selector_and_clone},
|
||||
};
|
||||
|
||||
pub fn setup_page(recipe_id: i64) {
|
||||
|
|
@ -262,7 +262,10 @@ pub fn setup_page(recipe_id: i64) {
|
|||
{
|
||||
let body = ron_api::Id { id: recipe_id };
|
||||
let _ = request::delete::<(), _>("recipe/remove", body).await;
|
||||
window().location().set_href("/").unwrap();
|
||||
window()
|
||||
.location()
|
||||
.set_href(&format!("/{}/", get_current_lang()))
|
||||
.unwrap();
|
||||
}
|
||||
});
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue