MCPcopy Create free account
hub / github.com/dhavalCode/ai-image-generator / handleClickOutside

Function handleClickOutside

client/src/components/ImageModal.tsx:55–66  ·  view source on GitHub ↗
(event: MouseEvent)

Source from the content-addressed store, hash-verified

53 }
54
55 const handleClickOutside = (event: MouseEvent) => {
56 if (
57 modalRef.current &&
58 !modalRef.current.contains(event.target as Node)
59 ) {
60 setDialogState({
61 ...dialogState,
62 open: false,
63 })
64 clearModalContent()
65 }
66 }
67
68 const handleClose = () => {
69 setDialogState({ ...dialogState, open: false })

Callers

nothing calls this directly

Calls 1

clearModalContentFunction · 0.85

Tested by

no test coverage detected