This commit is contained in:
focp212@naver.com
2025-10-30 11:06:57 +09:00
parent 506f6c0acf
commit acee57f819
5 changed files with 27 additions and 14 deletions

View File

@@ -11,10 +11,13 @@ import { useStore } from '@/shared/model/store';
export const UserManageWrap = () => {
const { t } = useTranslation();
const { navigate } = useNavigate();
const midOptions = useStore.getState().UserStore.selectOptionsMids;
const midOptionsWithoutGids = useStore.getState().UserStore.selectOptionsMidsWithoutGids;
const userMid = useStore.getState().UserStore.mid;
let midItem = midOptionsWithoutGids.filter((value, index) => {
return value.value === userMid;
});
const [mid, setMid] = useState<string>(userMid);
const [mid, setMid] = useState<string>((midItem.length > 0)? userMid: '');
const [userItems, setUserItems] = useState<Array<UserListItem>>([]);
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
@@ -38,7 +41,9 @@ export const UserManageWrap = () => {
};
useEffect(() => {
callList();
if(!!mid){
callList();
}
}, [mid]);
return (
@@ -52,7 +57,7 @@ export const UserManageWrap = () => {
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value)}
>
{
midOptions.map((value, index) => (
midOptionsWithoutGids.map((value, index) => (
<option
key={ value.value }
value={ value.value }