aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send/+layout.svelte
blob: 9e14fa39e9514b40cf5893ca331ac8efbf9eddbe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<script>
  import { goto } from "$app/navigation";
  import Pin from "$comp/Pin.svelte";
  import { pin } from "$lib/store";

  export let data;

  let { user } = data;
  let cancel = () => goto(`/${user.username}`);
</script>

{#if user?.haspin && (!$pin || $pin?.length !== 6)}
  <Pin bind:value={$pin} {cancel} />
{/if}

<slot />