filter mid 수정
This commit is contained in:
@@ -17,7 +17,9 @@ export interface UserInfoState {
|
||||
setUserMids: (update: SetStateAction<Array<string>>) => void;
|
||||
setUserEmails: (update: SetStateAction<Array<string>>) => void;
|
||||
selectOptionsMids: Array<Record<string, string>>;
|
||||
selectOptionsMidsWithoutGids: Array<Record<string, string>>;
|
||||
setSelectOptionsMids: (update: SetStateAction<Array<Record<string, string>>>) => void;
|
||||
setSelectOptionsMidsWithoutGids: (update: SetStateAction<Array<Record<string, string>>>) => void;
|
||||
selectOptionsEmails: Array<Record<string, string>>;
|
||||
setSelectOptionsEmails: (update: SetStateAction<Array<Record<string, string>>>) => void;
|
||||
mid: string;
|
||||
@@ -35,6 +37,7 @@ const initialUserInfoState = {
|
||||
userMids: [] as Array<string>,
|
||||
userEmails: [] as Array<string>,
|
||||
selectOptionsMids: [] as Array<Record<string, string>>,
|
||||
selectOptionsMidsWithoutGids: [] as Array<Record<string, string>>,
|
||||
selectOptionsEmails: [] as Array<Record<string, string>>,
|
||||
mid: '' as string,
|
||||
email: '' as string,
|
||||
@@ -131,6 +134,18 @@ export const createUserInfoStore = lens<UserInfoState>((set, get) => ({
|
||||
};
|
||||
});
|
||||
},
|
||||
setSelectOptionsMidsWithoutGids: (update) => {
|
||||
set((state: UserInfoState) => {
|
||||
const newSelectOptionsMidsWithoutGids = (typeof update === 'function')
|
||||
? update(state.selectOptionsMidsWithoutGids): update;
|
||||
return {
|
||||
...state,
|
||||
selectOptionsMidsWithoutGids: [
|
||||
...newSelectOptionsMidsWithoutGids
|
||||
],
|
||||
};
|
||||
});
|
||||
},
|
||||
setSelectOptionsEmails: (update) => {
|
||||
set((state: UserInfoState) => {
|
||||
const newSelectOptionsEmails = (typeof update === 'function')
|
||||
|
||||
Reference in New Issue
Block a user