mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-16 03:40:37 +08:00
Org navigation goes straight to 'create' dialog
This commit is contained in:
@@ -1,23 +1,15 @@
|
||||
<script lang="typescript">
|
||||
import type { SvelteComponent } from 'svelte';
|
||||
import { navigate } from 'svelte-routing';
|
||||
import { session } from '@app/session';
|
||||
import Create from '@app/base/orgs/Create.svelte';
|
||||
import type { Config } from '@app/config';
|
||||
|
||||
export let config: Config;
|
||||
|
||||
let modal: typeof SvelteComponent | null = null;
|
||||
let modal: typeof SvelteComponent = Create;
|
||||
|
||||
$: owner = $session && $session.address;
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<main>
|
||||
<button on:click={() => modal = Create} disabled={!owner} class="secondary">
|
||||
Create an Org
|
||||
</button>
|
||||
</main>
|
||||
|
||||
<svelte:component this={modal} {owner} {config} on:close={() => modal = null} />
|
||||
<svelte:component this={modal} {owner} {config} on:close={() => navigate('/')} />
|
||||
|
||||
Reference in New Issue
Block a user