aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send/+layout.svelte
blob: 5c6d8f11e8bf19701fcf7279de54dd578695d738 (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";

  let { data, children } = $props();

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

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

{@render children?.()}