fix keyword picker re-attaching hashes to links
This commit is contained in:
		| @@ -90,16 +90,17 @@ const GalleryPage = ({ | |||||||
|     if (!hash.length) { |     if (!hash.length) { | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
|     const url = new URL( |     // const url = new URL( | ||||||
|       typeof window !== "undefined" |     //   typeof window !== "undefined" | ||||||
|         ? window.location.href.toString() |     //     ? window.location.href.toString() | ||||||
|         : "https://chuckdries.com/photogallery/" |     //     : "https://chuckdries.com/photogallery/" | ||||||
|     ); |     // ); | ||||||
|  |  | ||||||
|     url.hash = ""; |     // url.hash = ""; | ||||||
|     window.history.replaceState(null, "", url.href.toString()); |     // window.history.replaceState(null, "", url.href.toString()); | ||||||
|  |     navigate(getGalleryPageUrl({ sortKey, keyword: filterKeyword, showDebug}, ""), { replace: true }) | ||||||
|     window.removeEventListener("wheel", removeHash); |     window.removeEventListener("wheel", removeHash); | ||||||
|   }, [hash]); |   }, [hash, sortKey, filterKeyword, showDebug]); | ||||||
|  |  | ||||||
|   React.useEffect(() => { |   React.useEffect(() => { | ||||||
|     window.addEventListener("wheel", removeHash); |     window.addEventListener("wheel", removeHash); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user