diff --git a/src/common/attachment-drafts/store-attachment-drafts_vanilla.ts b/src/common/attachment-drafts/store-attachment-drafts_vanilla.ts index 38ec0ceb7..a117a9cb8 100644 --- a/src/common/attachment-drafts/store-attachment-drafts_vanilla.ts +++ b/src/common/attachment-drafts/store-attachment-drafts_vanilla.ts @@ -1,10 +1,9 @@ -import type { StoreApi } from 'zustand'; import { createStore as createVanillaStore } from 'zustand/vanilla'; -import { AttachmentsDraftsStore, createAttachmentDraftsStoreSlice } from './store-attachment-drafts_slice'; +import { AttachmentDraftsStoreApi, AttachmentsDraftsStore, createAttachmentDraftsStoreSlice } from './store-attachment-drafts_slice'; -export const createAttachmentDraftsVanillaStore = (): StoreApi => createVanillaStore()((...a) => ({ +export const createAttachmentDraftsVanillaStore = (): AttachmentDraftsStoreApi => createVanillaStore()((...a) => ({ // Attachments: attachment drafts ...createAttachmentDraftsStoreSlice(...a), @@ -15,5 +14,5 @@ export const createAttachmentDraftsVanillaStore = (): StoreApi(vanillaStore: Readonly> | null, selector: (store: AttachmentsDraftsStore) => T): T => +// export const useChatAttachmentsStore = (vanillaStore: Readonly | null, selector: (store: AttachmentsDraftsStore) => T): T => // useStore(vanillaStore || fallbackStoreApi, selector); diff --git a/src/common/chat-overlay/store-perchat_vanilla.ts b/src/common/chat-overlay/store-perchat_vanilla.ts index 77869b464..1b47803db 100644 --- a/src/common/chat-overlay/store-perchat_vanilla.ts +++ b/src/common/chat-overlay/store-perchat_vanilla.ts @@ -1,7 +1,7 @@ import { StoreApi, useStore } from 'zustand'; import { createStore as createVanillaStore } from 'zustand/vanilla'; -import { AttachmentsDraftsStore, createAttachmentDraftsStoreSlice } from '~/common/attachment-drafts/store-attachment-drafts_slice'; +import { AttachmentDraftsStoreApi, AttachmentsDraftsStore, createAttachmentDraftsStoreSlice } from '~/common/attachment-drafts/store-attachment-drafts_slice'; import { ComposerOverlayStore, createComposerOverlayStoreSlice } from './store-perchat-composer_slice'; import { createEphemeralsOverlayStoreSlice, EphemeralsOverlayStore } from './store-perchat-ephemerals_slice'; @@ -41,7 +41,7 @@ export const useChatOverlayStore = (vanillaStore: Readonly(vanillaStore: Readonly> | null, selector: (store: AttachmentsDraftsStore) => T): T => +export const useChatAttachmentsStore = (vanillaStore: Readonly | null, selector: (store: AttachmentsDraftsStore) => T): T => useStore(vanillaStore || fallbackStoreApi, selector); // usages: Composer