알림함 카테고리 셋팅

This commit is contained in:
focp212@naver.com
2025-10-27 11:30:02 +09:00
parent 9eba765957
commit 9be67b403e
12 changed files with 242 additions and 130 deletions

View File

@@ -16,6 +16,8 @@ export interface CommonState {
setBankList: (update: SetStateAction<Array<any>>) => void;
virtualBankList: Array<any>;
setVirtualBankList: (update: SetStateAction<Array<any>>) => void;
appNotificationCategories: Array<any>;
setAppNotificationCategories: (update: SetStateAction<Array<any>>) => void;
};
const initialBannerInfoState = {
@@ -24,6 +26,10 @@ const initialBannerInfoState = {
const initialCommonState = {
serviceCodes: [] as Array<any>,
creditCardList: [] as Array<any>,
bankList: [] as Array<any>,
virtualBankList: [] as Array<any>,
appNotificationCategories: [] as Array<any>
} as CommonState;
export const createBannerInfoStore = lens<BannerInfoState>((set, get) => ({
@@ -94,4 +100,16 @@ export const createCommonStore = lens<CommonState>((set, get) => ({
};
});
},
setAppNotificationCategories: (update) => {
set((state: CommonState) => {
const newAppNotificationCategories = (typeof update === 'function')
? update(state.appNotificationCategories): update;
return {
...state,
appNotificationCategories: [
...newAppNotificationCategories
]
};
});
},
}));