(event: React.MouseEvent<HTMLDivElement>)
| 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}> |