<script lang="ts">
  import { page } from '$app/state';
  import { onDestroy, onMount } from 'svelte';

  let mounted = $state(false);
  onMount(() => (mounted = true));
  onDestroy(() => (mounted = false));
</script>

<svelte:head>
  {#if !mounted}
    <noscript>
      <meta http-equiv="refresh" content="5; url={page.url.href}" />
    </noscript>
  {/if}
</svelte:head>
