Skip to content

Commit adcc897

Browse files
committed
use svelte/reactivity/window
instead of <svelte:window bind:online /> https://svelte.dev/docs/svelte/svelte-reactivity-window#online
1 parent cbeeefe commit adcc897

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/Footer.svelte

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<script lang="ts">
2+
import { online } from "svelte/reactivity/window";
23
import { config } from "../libs/config";
3-
let online = $state(true);
44
let popover: HTMLElement;
55
</script>
66

7-
<svelte:window bind:online />
8-
9-
<footer class:offline={!online}>
7+
<footer class:offline={!online.current}>
108
<a href={config.homePage}>irclog home page</a> | ver:
119
<button title="Build Info" onclick={() => popover.showPopover()}>{config.version}</button>
1210
<div id="build-info" popover="auto" bind:this={popover}>

0 commit comments

Comments
 (0)