minor changes

This commit is contained in:
Felix Ableitner 2024-01-24 15:02:06 +01:00
parent ccde4b4666
commit e0cc23c0bc
3 changed files with 2 additions and 15 deletions

View File

@ -140,7 +140,7 @@ async fn federation_routes_middleware<B>(request: Request<B>, next: Next<B>) ->
uri = format!("{FEDERATION_ROUTES_PREFIX}{uri}");
}
// drop trailing slash
if uri.ends_with('/') {
if uri.ends_with('/') && uri.len() > 1 {
uri.pop();
}
parts.uri = uri.parse().unwrap();

View File

@ -3,16 +3,3 @@ pub mod app;
mod components;
pub mod error;
pub mod pages;
#[cfg(feature = "hydrate")]
#[wasm_bindgen::prelude::wasm_bindgen]
pub fn hydrate() {
/*
_ = console_log::init_with_level(log::Level::Debug);
console_error_panic_hook::set_once();
leptos::mount_to_body(move || {
view! { <App/> }
});
info!("test 1");
*/
}

View File

@ -33,7 +33,7 @@ pub fn ReadArticle() -> impl IntoView {
{move || article.get().map(|article|
view! {
<div class="item-view">
<h1>{article.article.title}</h1>
<h1>{article.article.title.replace('_', " ")}</h1>
<Show when=move || global_state.with(|state| state.my_profile.is_some())>
<button on:click=move |_| {
set_count.update(|n| *n += 1);