fix: use Signal::derive for reactive class prop to satisfy MaybeSignal bound

This commit is contained in:
spinline
2026-01-31 13:56:34 +03:00
parent bcbdbbfa71
commit e61dd7b19d

View File

@@ -398,7 +398,7 @@ pub fn App() -> impl IntoView {
<Button <Button
variant=ButtonVariant::Ghost variant=ButtonVariant::Ghost
class={move || if active_tab.get() == "settings" { "text-primary bg-primary/10 border-primary/20".to_string() } else { "text-muted-foreground".to_string() }} class={Signal::derive(move || if active_tab.get() == "settings" { "text-primary bg-primary/10 border-primary/20".to_string() } else { "text-muted-foreground".to_string() })}
on_click=Callback::from(move |_| set_active_tab.set(if active_tab.get() == "settings" { "torrents" } else { "settings" })) on_click=Callback::from(move |_| set_active_tab.set(if active_tab.get() == "settings" { "torrents" } else { "settings" }))
> >
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">