fix: prevent closing dialog when fetcher is in progress
This commit is contained in:
parent
7ab83a4f66
commit
df3b14a212
@ -116,7 +116,11 @@ export const AdvertisementsPage = () => {
|
|||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
open={!!selectedId}
|
open={!!selectedId}
|
||||||
onClose={() => setSelectedId(undefined)}
|
onClose={() => {
|
||||||
|
if (fetcher.state === 'idle') {
|
||||||
|
setSelectedId(undefined)
|
||||||
|
}
|
||||||
|
}}
|
||||||
className="relative z-50"
|
className="relative z-50"
|
||||||
transition
|
transition
|
||||||
>
|
>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user