전투이벤트 등록 알림 비동기에따른 state 초기화 부분 수정
This commit is contained in:
@@ -66,7 +66,8 @@ const BattleEventModal = ({ modalType, detailView, handleDetailView, content, se
|
||||
if(modalType === TYPE_REGISTRY && configData?.length > 0){
|
||||
setResultData(prev => ({
|
||||
...prev,
|
||||
round_count: configData[0].default_round_count
|
||||
round_count: configData[0].default_round_count,
|
||||
round_time: configData[0].round_time
|
||||
}));
|
||||
}
|
||||
}, [modalType, configData]);
|
||||
@@ -187,10 +188,10 @@ const BattleEventModal = ({ modalType, detailView, handleDetailView, content, se
|
||||
return;
|
||||
}
|
||||
|
||||
if(resultData.round_time === 0){
|
||||
const config = configData.find(data => data.id === resultData.config_id);
|
||||
setResultData({ ...resultData, round_time: config.round_time });
|
||||
}
|
||||
// if(resultData.round_time === 0){
|
||||
// const config = configData.find(data => data.id === resultData.config_id);
|
||||
// setResultData({ ...resultData, round_time: config.round_time });
|
||||
// }
|
||||
|
||||
showModal(isView('modify') ? 'BATTLE_EVENT_UPDATE_CONFIRM' : 'BATTLE_EVENT_REGIST_CONFIRM', {
|
||||
type: alertTypes.confirm,
|
||||
@@ -267,6 +268,8 @@ const BattleEventModal = ({ modalType, detailView, handleDetailView, content, se
|
||||
}
|
||||
}
|
||||
|
||||
console.log(configData)
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal min="760px" $view={detailView}>
|
||||
|
||||
Reference in New Issue
Block a user