[#77] fixed when getEventAsync is dispatched to prevent missing data

This commit is contained in:
Camille Moussu
2025-09-05 13:07:51 +02:00
parent 8efeea8102
commit 0549a77d92
3 changed files with 32 additions and 22 deletions
-6
View File
@@ -182,13 +182,7 @@ export default function EventDisplayModal({
onClose({}, "backdropClick");
};
const [detailsLoaded, setDetailsLoaded] = useState(false);
const handleToggleShowMore = async () => {
if (!detailsLoaded) {
await dispatch(getEventAsync(event));
setDetailsLoaded(true);
}
setShowMore(!showMore);
};
@@ -136,6 +136,7 @@ export default function EventPreviewModal({
size="small"
onClick={async () => {
setOpenFullDisplay(!openFullDisplay);
await dispatch(getEventAsync(event));
}}
>
<EditIcon fontSize="small" />