From 47e14a426f9e4d1c670aa2a823880012bb2d1a88 Mon Sep 17 00:00:00 2001 From: Sahil Gupte Date: Wed, 18 Dec 2024 00:30:32 -0500 Subject: [PATCH] Fix redirection from search page --- src-tauri/tauri.conf.json | 2 +- src/app.rs | 2 ++ src/components/cardview.rs | 7 ++++++- src/main.rs | 1 + src/pages/search.rs | 3 +++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index c2c8c389..9be234a4 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -36,7 +36,7 @@ "withGlobalTauri": true }, "build": { - "beforeDevCommand": "trunk serve --config ../Trunk.toml", + "beforeDevCommand": "trunk serve", "beforeBuildCommand": "pwd && trunk build --release", "devUrl": "http://localhost:1420", "frontendDist": "../dist" diff --git a/src/app.rs b/src/app.rs index 617ca533..d3babfa7 100644 --- a/src/app.rs +++ b/src/app.rs @@ -4,6 +4,7 @@ use crate::{ components::{ better_animated_outlet::AnimatedOutletSimultaneous, prefs::static_components::SettingRoutes, }, + console_info, pages::explore::Explore, players::librespot::LibrespotPlayer, store::ui_store::UiStore, @@ -50,6 +51,7 @@ use crate::{ #[tracing::instrument(level = "trace", skip())] #[component] pub fn RedirectAll() -> impl IntoView { + tracing::info!("Current location {:?}", window().location().href()); view! { } } diff --git a/src/components/cardview.rs b/src/components/cardview.rs index 826f8f85..709971d0 100644 --- a/src/components/cardview.rs +++ b/src/components/cardview.rs @@ -101,6 +101,7 @@ pub fn CardView( #[prop()] card_item: C, #[prop(optional, default = false)] songs_view: bool, #[prop(optional)] on_click: Option>, + #[prop(optional, default = "")] redirect_root: &'static str, ) -> impl IntoView where T: 'static + Clone, @@ -140,7 +141,11 @@ where } } else { view! { - + impl IntoView { view! { impl IntoView { view! { impl IntoView { view! {