fix(feat-SW-94): use function declarations

This commit is contained in:
Chuma McPhoy
2024-08-12 11:07:41 +02:00
parent 404bf867db
commit ae066d850e

View File

@@ -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()