mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-30 13:35:04 +02:00
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
19 lines
360 B
Svelte
19 lines
360 B
Svelte
<script lang="ts">
|
|
import { onDestroy, onMount } from 'svelte'
|
|
|
|
import { type PresenceClient, connect } from '../client'
|
|
|
|
let parentElement: HTMLDivElement
|
|
let client: PresenceClient | undefined
|
|
|
|
onMount(() => {
|
|
client = connect()
|
|
})
|
|
|
|
onDestroy(() => {
|
|
client?.close()
|
|
})
|
|
</script>
|
|
|
|
<div bind:this={parentElement} class="hidden"></div>
|