diff --git a/hooks/useHash.tsx b/hooks/useHash.tsx index 8a3990122..1dadf8b8b 100644 --- a/hooks/useHash.tsx +++ b/hooks/useHash.tsx @@ -3,10 +3,11 @@ import { useParams } from "next/navigation" import { useEffect, useState } from "react" -const getHash = () => - typeof window !== "undefined" ? window.location.hash : undefined +function getHash() { + return typeof window !== "undefined" ? window.location.hash : undefined +} -const useHash = () => { +function useHash() { const [isClient, setIsClient] = useState(false) const [hash, setHash] = useState(getHash()) const params = useParams()