MCPcopy Create free account
hub / github.com/SyntaxUI/syntaxui / onClickDialog

Function onClickDialog

src/components/MobileNavigation.tsx:67–80  ·  view source on GitHub ↗
(event: React.MouseEvent<HTMLDivElement>)

Source from the content-addressed store, hash-verified

65 }, [pathname, searchParams, close, initialPathname, initialSearchParams])
66
67 function onClickDialog(event: React.MouseEvent<HTMLDivElement>) {
68 if (!(event.target instanceof HTMLElement)) {
69 return
70 }
71
72 let link = event.target.closest('a')
73 if (
74 link &&
75 link.pathname + link.search + link.hash ===
76 window.location.pathname + window.location.search + window.location.hash
77 ) {
78 close()
79 }
80 }
81
82 return (
83 <Transition.Root show={isOpen} as={Fragment}>

Callers

nothing calls this directly

Calls 1

closeFunction · 0.85

Tested by

no test coverage detected