가맹점 수정
This commit is contained in:
@@ -14,16 +14,15 @@ export const InfoWrap = () => {
|
||||
const userMids = useStore.getState().UserStore.userMids;
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
|
||||
const [mid, setMid] = useState<string | undefined>(userMids[0]);
|
||||
const [data, setData] = useState<MerchantMidResponse>();
|
||||
|
||||
const [openChild, setOpenChild] = useState<InfoWrapKeys | null>(null);
|
||||
|
||||
const { mutateAsync: merchantMid } = useMerchantMidMutation();
|
||||
|
||||
const callInfo = (selectedMid?: string) => {
|
||||
const callInfo = (selectedMid: string) => {
|
||||
let params: MerchantMidParams = {
|
||||
mid: selectedMid || mid
|
||||
mid: selectedMid
|
||||
};
|
||||
merchantMid(params).then((rs: MerchantMidResponse) => {
|
||||
setData(rs);
|
||||
@@ -31,12 +30,13 @@ export const InfoWrap = () => {
|
||||
};
|
||||
|
||||
const onChangeMid = (value: string) => {
|
||||
setMid(value);
|
||||
callInfo(value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callInfo();
|
||||
if(userMids[0]){
|
||||
callInfo(userMids[0]);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user