Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

{#if data.databases.total}
{#if data.view === 'grid'}
<Grid {data} />
<Grid {data} bind:showCreate />
{:else}
<Table {data} />
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

{#if data.collections.total}
{#if data.view === 'grid'}
<Grid {data} />
<Grid {data} {showCreate} />
{:else}
<Table {data} />
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
import { page } from '$app/stores';
import { CardContainer, GridItem1, Id } from '$lib/components';
import { Pill } from '$lib/elements';
import type { Writable } from 'svelte/store';
import type { PageData } from './$types';
export let data: PageData;
export let showCreate = false;
export let showCreate: Writable<boolean>;
const projectId = $page.params.project;
const databaseId = $page.params.database;
</script>

<CardContainer
total={data.collections.total}
on:click={() => (showCreate = true)}
on:click={() => ($showCreate = true)}
event="collection">
{#each data.collections.collections as collection}
<GridItem1
Expand Down
2 changes: 1 addition & 1 deletion src/routes/console/project-[project]/databases/grid.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { CardContainer, GridItem1, Id } from '$lib/components';
import type { PageData } from './$types';
export let data: PageData;
export let showCreate = false;
export let showCreate: boolean;
const project = $page.params.project;
</script>

Expand Down