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

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

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

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

{@render children?.()}