From a0654a789de40bb0f966a2d2c528608259561857 Mon Sep 17 00:00:00 2001 From: luoxiaozero <48741584+luoxiaozero@users.noreply.github.com> Date: Mon, 18 Mar 2024 22:00:09 +0800 Subject: [PATCH] fix: Toast cfg in ssr mode (#144) --- thaw/src/mobile/toast/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thaw/src/mobile/toast/mod.rs b/thaw/src/mobile/toast/mod.rs index da9047f..e7ebfec 100644 --- a/thaw/src/mobile/toast/mod.rs +++ b/thaw/src/mobile/toast/mod.rs @@ -9,7 +9,7 @@ pub struct ToastOptions { pub fn show_toast(options: ToastOptions) { mount_style("toast", include_str!("./toast.css")); - cfg_if! { if #[cfg(target_arch = "wasm32")] { + cfg_if! { if #[cfg(all(target_arch = "wasm32", any(feature = "csr", feature = "hydrate")))] { use leptos::{leptos_dom::Mountable, *}; let mount = document().body().expect("body element to exist"); let children = view! {
{options.message}
};