fix: icon rendering problem in ssr mode (#148)

This commit is contained in:
luoxiaozero 2024-03-20 15:56:52 +08:00 committed by GitHub
parent 535594f963
commit 236914cf61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -97,7 +97,7 @@ pub fn SiteHeader() -> impl IntoView {
font-size: 20px; font-size: 20px;
} }
.demo-header__menu-mobile { .demo-header__menu-mobile {
display: none; display: none !important;
} }
.demo-header__menu-popover-mobile { .demo-header__menu-popover-mobile {
padding: 0; padding: 0;
@ -112,10 +112,10 @@ pub fn SiteHeader() -> impl IntoView {
} }
@media screen and (max-width: 1200px) { @media screen and (max-width: 1200px) {
.demo-header__right-btn { .demo-header__right-btn {
display: none; display: none !important;
} }
.demo-header__menu-mobile { .demo-header__menu-mobile {
display: block; display: block !important;
} }
} }
" "

View file

@ -34,7 +34,7 @@ pub fn Icon(
let icon_fill = RwSignal::new(None); let icon_fill = RwSignal::new(None);
let icon_data = RwSignal::new(None); let icon_data = RwSignal::new(None);
create_render_effect(move |_| { create_isomorphic_effect(move |_| {
let icon = icon.get(); let icon = icon.get();
let style = match (style.clone(), icon.style) { let style = match (style.clone(), icon.style) {