This commit is contained in:
Eric Bailey
2024-02-08 13:31:37 -06:00
parent 667729f7db
commit 97572fd5a2
+7 -3
View File
@@ -89,7 +89,11 @@ export function GlobalDialog() {
popTopDialog()
}, [popTopDialog])
return activeDialogs.map(({component: Comp, props, options}, i) => {
return <Comp key={i} {...props} cleanup={cleanup} options={options} />
})
return React.useMemo(
() =>
activeDialogs.map(({component: Comp, props, options}, i) => {
return <Comp key={i} {...props} cleanup={cleanup} options={options} />
}),
[activeDialogs, cleanup],
)
}