diff --git a/src/lib/constants.ts b/src/lib/constants.ts index c6089a6c6..1c011ef74 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -16,8 +16,6 @@ export enum Dependencies { COLLECTION = 'collection', DOCUMENT = 'document', DOCUMENTS = 'documents', - ATTRIBUTES = 'attributes', - INDEXES = 'indexes', BUCKET = 'bucket', FILE = 'file', FILES = 'files', diff --git a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/+layout.ts b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/+layout.ts index 65447fe19..4cff24c2d 100644 --- a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/+layout.ts +++ b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/+layout.ts @@ -6,8 +6,8 @@ import Header from './header.svelte'; import { error } from '@sveltejs/kit'; export const load: LayoutLoad = async ({ params, parent, depends }) => { - await parent(); depends(Dependencies.COLLECTION); + await parent(); try { return { diff --git a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte index 2714091da..e63615b09 100644 --- a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte +++ b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte @@ -10,16 +10,13 @@ } from '$lib/elements/table'; import { Button } from '$lib/elements/forms'; import { DropList, DropListItem, Empty, Heading } from '$lib/components'; - import type { Attributes } from '../store'; + import { attributes, type Attributes } from '../store'; import { Container } from '$lib/layout'; import { Pill } from '$lib/elements'; import Create from './createAttribute.svelte'; import CreateIndex from '../indexes/createIndex.svelte'; import Delete from './deleteAttribute.svelte'; import Overview from './overview.svelte'; - import type { PageData } from './$types'; - - export let data: PageData; let showDropdown = []; let selectedAttribute: Attributes = null; @@ -39,7 +36,7 @@ - {#if data.attributes.total} + {#if $attributes.length}
Total results: {data.attributes.total}
+Total results: {$attributes.length}
Total results: {data.indexes.total}
+Total results: {$indexes.length}
Create your first attribute to get started