diff --git a/src/routes/console/project-[project]/messaging/+page.svelte b/src/routes/console/project-[project]/messaging/+page.svelte index e27bd3f07..ea367ea75 100644 --- a/src/routes/console/project-[project]/messaging/+page.svelte +++ b/src/routes/console/project-[project]/messaging/+page.svelte @@ -34,12 +34,14 @@ import FailedModal from './failedModal.svelte'; import MessageStatusPill from './messageStatusPill.svelte'; import ProviderType from './providerType.svelte'; - import { columns, showCreate } from './store'; + import { showCreate } from './store'; import { sdk } from '$lib/stores/sdk'; import { invalidate } from '$app/navigation'; import { trackEvent, Submit, trackError } from '$lib/actions/analytics'; import { Dependencies } from '$lib/constants'; import { addNotification } from '$lib/stores/notifications'; + import type { Column } from '$lib/helpers/types'; + import { writable } from 'svelte/store'; export let data: PageData; let selected: string[] = []; @@ -50,6 +52,14 @@ let showCreateDropdownMobile = false; let showCreateDropdownDesktop = false; let showCreateDropdownEmpty = false; + const columns = writable([ + { id: '$id', title: 'Message ID', type: 'string', show: true, width: 140 }, + { id: 'message', title: 'Message', type: 'string', show: false, filter: false, width: 140 }, + { id: 'providerType', title: 'Type', type: 'string', show: true, width: 100 }, + { id: 'status', title: 'Status', type: 'string', show: true, width: 120 }, + { id: 'scheduledAt', title: 'Scheduled at', type: 'datetime', show: true, width: 120 }, + { id: 'deliveredAt', title: 'Delivered at', type: 'datetime', show: false, width: 120 } + ]); const project = $page.params.project; diff --git a/src/routes/console/project-[project]/messaging/store.ts b/src/routes/console/project-[project]/messaging/store.ts index bf214f6c3..cdd4bffdc 100644 --- a/src/routes/console/project-[project]/messaging/store.ts +++ b/src/routes/console/project-[project]/messaging/store.ts @@ -1,17 +1,7 @@ -import type { Column } from '$lib/helpers/types'; import type { Models } from '@appwrite.io/console'; import { writable } from 'svelte/store'; export const showCreate = writable(false); -export const columns = writable([ - { id: '$id', title: 'Message ID', type: 'string', show: true, width: 140 }, - { id: 'message', title: 'Message', type: 'string', show: false, filter: false, width: 140 }, - { id: 'providerType', title: 'Type', type: 'string', show: true, width: 100 }, - { id: 'status', title: 'Status', type: 'string', show: true, width: 120 }, - { id: 'scheduledAt', title: 'Scheduled at', type: 'datetime', show: true, width: 120 }, - { id: 'deliveredAt', title: 'Delivered at', type: 'datetime', show: false, width: 120 } -]); - export const targetsById = writable>({}); export const topicsById = writable>({});