app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

AppShellHarness.svelte (928B)


      1 <script lang="ts">
      2   import AppShell from '../../../src/lib/components/AppShell.svelte';
      3   let {
      4     connected = false,
      5     available = false,
      6     messages = true,
      7     currentPath = '/',
      8     publicKey = 'HC_TEST_ONLY_PUBLIC_KEY_' + 'a'.repeat(64),
      9     onconnect,
     10     ondisconnect
     11   }: {
     12     connected?: boolean;
     13     available?: boolean;
     14     messages?: boolean;
     15     currentPath?: string;
     16     publicKey?: string;
     17     onconnect?: () => void;
     18     ondisconnect?: () => void;
     19   } = $props();
     20 </script>
     21 
     22 <AppShell
     23   {currentPath}
     24   availableRoutes={available
     25     ? [
     26         '/search',
     27         '/sell',
     28         ...(connected ? ['/selling' as const] : []),
     29         ...(connected && messages ? ['/messages' as const] : []),
     30         '/about',
     31         '/privacy'
     32       ]
     33     : []}
     34   identity={connected
     35     ? { kind: 'connected', publicKey, ondisconnect }
     36     : { kind: 'guest', onconnect }}
     37 >
     38   <h1>Fixture route heading</h1>
     39 </AppShell>