fix(feat-SW-94): use function declarations
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user