fix(feat-SW-94): use function declarations
This commit is contained in:
@@ -3,10 +3,11 @@
|
|||||||
import { useParams } from "next/navigation"
|
import { useParams } from "next/navigation"
|
||||||
import { useEffect, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
|
|
||||||
const getHash = () =>
|
function getHash() {
|
||||||
typeof window !== "undefined" ? window.location.hash : undefined
|
return typeof window !== "undefined" ? window.location.hash : undefined
|
||||||
|
}
|
||||||
|
|
||||||
const useHash = () => {
|
function useHash() {
|
||||||
const [isClient, setIsClient] = useState(false)
|
const [isClient, setIsClient] = useState(false)
|
||||||
const [hash, setHash] = useState(getHash())
|
const [hash, setHash] = useState(getHash())
|
||||||
const params = useParams()
|
const params = useParams()
|
||||||
|
|||||||
Reference in New Issue
Block a user