keep tracking down window issues

This commit is contained in:
Chuck Dries 2022-07-10 17:35:00 -07:00
parent f3aba3c4df
commit f038f5e9ef
No known key found for this signature in database
GPG Key ID: A00B7AEAE1DC5BE6

View File

@ -17,7 +17,7 @@ const SORT_KEYS = {
};
const GalleryPage = ({ data }) => {
const hash = window.location.hash.replace("#", "");
const hash = typeof window !== "undefined" ? window.location.hash.replace("#", "") : "";
const [filterKeyword, _setKeyword] = React.useState(null);
const [sortKey, _setSortKey] = React.useState("rating");