aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send/+layout.svelte
blob: 086eec54192f15eca8bf33040393a65cf1d9d5e5 (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 bind:value={$pin} {cancel} />
{/if}

{@render children?.()}