fix: toast notifications context issue by wrapping app in SonnerProvider
All checks were successful
Build MIPS Binary / build (push) Successful in 5m14s
All checks were successful
Build MIPS Binary / build (push) Successful in 5m14s
This commit is contained in:
@@ -12,6 +12,15 @@ use leptos_shadcn_toast::SonnerProvider;
|
|||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn App() -> impl IntoView {
|
pub fn App() -> impl IntoView {
|
||||||
|
view! {
|
||||||
|
<SonnerProvider>
|
||||||
|
<InnerApp />
|
||||||
|
</SonnerProvider>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
fn InnerApp() -> impl IntoView {
|
||||||
crate::store::provide_torrent_store();
|
crate::store::provide_torrent_store();
|
||||||
let store = use_context::<crate::store::TorrentStore>();
|
let store = use_context::<crate::store::TorrentStore>();
|
||||||
|
|
||||||
@@ -70,7 +79,6 @@ pub fn App() -> impl IntoView {
|
|||||||
});
|
});
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<SonnerProvider>
|
|
||||||
<div class="relative w-full h-screen" style="height: 100dvh;">
|
<div class="relative w-full h-screen" style="height: 100dvh;">
|
||||||
<Router>
|
<Router>
|
||||||
<Routes fallback=|| view! { <div class="p-4">"404 Not Found"</div> }>
|
<Routes fallback=|| view! { <div class="p-4">"404 Not Found"</div> }>
|
||||||
@@ -190,6 +198,5 @@ pub fn App() -> impl IntoView {
|
|||||||
</Routes>
|
</Routes>
|
||||||
</Router>
|
</Router>
|
||||||
</div>
|
</div>
|
||||||
</SonnerProvider>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user