From ebcccc4ae13f690220374497f932f58ec5fd7cfd Mon Sep 17 00:00:00 2001 From: Aylur Date: Sat, 28 Dec 2024 01:33:32 +0100 Subject: fix: examples without wifi --- examples/js/simple-bar/widget/Bar.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'examples/js/simple-bar') diff --git a/examples/js/simple-bar/widget/Bar.tsx b/examples/js/simple-bar/widget/Bar.tsx index c109aec..b08ea27 100644 --- a/examples/js/simple-bar/widget/Bar.tsx +++ b/examples/js/simple-bar/widget/Bar.tsx @@ -25,13 +25,19 @@ function SysTray() { } function Wifi() { - const { wifi } = Network.get_default() + const network = Network.get_default() + const wifi = bind(network, "wifi") + + return + {wifi.as(wifi => wifi && ( + + ))} + - return } function AudioSlider() { -- cgit v1.2.3