"use client" import { useParams } from "next/navigation" import { useEffect, useState } from "react" export default function useHash() { const [hash, setHash] = useState(undefined) const params = useParams() useEffect(() => { setHash(window.location.hash) }, [params]) return hash?.slice(1) }