Skip to main content

Function: useModalCloseHandler()

useModalCloseHandler(setShowModal: StateSetter<boolean>): () => void

Defined in: shared/utils/modalHandlers.ts:31

Creates a standardized modal close handler.

Parametersโ€‹

setShowModalโ€‹

StateSetter<boolean>

State setter function for the modal visibility

Returnsโ€‹

Memoized close handler function

(): void

Returnsโ€‹

void

Remarksโ€‹

Provides a memoized callback for closing modals by setting state to false. Common pattern found across modal components.