解决供应商导游在返回时没有读取的情况

release
Jimmy Liow 2 years ago
parent 93409625b3
commit ede6dfff8f

@ -111,18 +111,18 @@ function Newest() {
useEffect (() => {
if (location.search !== '?back') {
//
onSearchClick(1, 1);
reservationStore.fetchAllGuideList()
.then((guideList) => {
const selectOptions = guideList.map((data, index) => {
return {
value: data.guideId,
label: data.guideName
}
});
setGuideSelectOptions(selectOptions);
});
onSearchClick(1, 1);
}
reservationStore.fetchAllGuideList()
.then((guideList) => {
const selectOptions = guideList.map((data, index) => {
return {
value: data.guideId,
label: data.guideName
}
});
setGuideSelectOptions(selectOptions);
});
return () => {
// unmount...
};

Loading…
Cancel
Save