From a8ef4e5be847cb16528b3f1d5759dd086d1d00e3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 1 Dec 2023 09:02:02 +1100 Subject: [PATCH] fix(ui): fix types and storage prefix --- invokeai/frontend/web/src/app/store/store.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/invokeai/frontend/web/src/app/store/store.ts b/invokeai/frontend/web/src/app/store/store.ts index 87edba56e0..0e3634468b 100644 --- a/invokeai/frontend/web/src/app/store/store.ts +++ b/invokeai/frontend/web/src/app/store/store.ts @@ -94,7 +94,7 @@ export const createStore = (uniqueStoreKey?: string) => serialize, unserialize, prefix: uniqueStoreKey - ? `${STORAGE_PREFIX}-${uniqueStoreKey}-` + ? `${STORAGE_PREFIX}${uniqueStoreKey}-` : STORAGE_PREFIX, }) ) @@ -133,8 +133,11 @@ export const createStore = (uniqueStoreKey?: string) => }, }); -export type RootState = ReturnType; +export type AppGetState = ReturnType< + ReturnType['getState'] +>; +export type RootState = ReturnType['getState']>; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type AppThunkDispatch = ThunkDispatch; -export type AppDispatch = ReturnType['dispatch']; +export type AppDispatch = ReturnType['dispatch']; export const stateSelector = (state: RootState) => state;