<script>
  import { connect_socket, configure_socket } from "$/client/websocket.js";
  import { onMount } from 'svelte';

  let socket;

  onMount(async () => {
    await configure_socket();
    socket = connect_socket(true);

    socket.on("/reloader/update", async (data) => {
      location.reload();
    })
  })
</script>
