mid 셋팅및 코드 정리
This commit is contained in:
@@ -10,10 +10,14 @@ import {
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { useUserChangeCancelPasswordMutation } from '@/entities/user/api/use-user-change-cancel-password-mutation';
|
||||
import { snackBar } from '@/shared/lib/toast';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const PasswordModifyCancelPasswordPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const [mid, setMid] = useState<string>('nictest00m');
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [password, setPassword] = useState<string>('');
|
||||
const [confirmPassword, setConfirmPassword] = useState<string>('');
|
||||
|
||||
@@ -74,10 +78,19 @@ export const PasswordModifyCancelPasswordPage = () => {
|
||||
<div className="user-add">
|
||||
<div className="ua-row">
|
||||
<div className="ua-label">가맹점 <span className="red">*</span></div>
|
||||
<select className="wid-100" value={mid} onChange={(e) => setMid(e.target.value)}>
|
||||
{midList.map((item) => (
|
||||
<option key={item.value} value={item.value}>{item.label}</option>
|
||||
))}
|
||||
<select
|
||||
className="wid-100"
|
||||
onChange={(e) => setMid(e.target.value)}
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (userMid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div className="ua-row">
|
||||
|
||||
Reference in New Issue
Block a user