+ drop unnecessary hook dependency
This commit is contained in:
Robin Malfait
2025-05-10 02:34:13 +02:00
parent 18cf98454d
commit 7ff4b5bb9b
@@ -37,7 +37,7 @@ export function useIsTopLayer(enabled: boolean, scope: string | null) {
stackMachine.selectors.isTop(state, id),
stackMachine.selectors.inStack(state, id),
],
[stackMachine, id, enabled]
[stackMachine, id]
)
)
@@ -49,7 +49,7 @@ export function useIsTopLayer(enabled: boolean, scope: string | null) {
return () => stackMachine.actions.pop(id)
}, [stackMachine, enabled, id])
// If the hook is not enabled, we know for sure it is not going to tbe the
// If the hook is not enabled, we know for sure it is not going to be the
// top-most item.
if (!enabled) return false