diff options
Diffstat (limited to 'ui/lib/components/Channel.svelte')
| -rw-r--r-- | ui/lib/components/Channel.svelte | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/lib/components/Channel.svelte b/ui/lib/components/Channel.svelte index e62f0f3..bbe9ff7 100644 --- a/ui/lib/components/Channel.svelte +++ b/ui/lib/components/Channel.svelte @@ -1,14 +1,20 @@ <script> + import { showMenu } from '$lib/store'; + export let id; export let name; export let active = false; + + function hideMenu() { + showMenu.update(() => false); + } </script> <li class="rounded-full" class:bg-slate-400={active} > -<a href="/ch/{id}"> +<a href="/ch/{id}" on:click={hideMenu}> <span class="badge bg-primary-500">#</span> <span class="flex-auto">{name}</span> </a> |
