fix(SW-1960): Changes to how we handle hash inside hotelpages after Next15 upgrade

Approved-by: Michael Zetterberg
Approved-by: Linus Flood
This commit is contained in:
Erik Tiekstra
2025-06-04 10:30:27 +00:00
parent b2972318bb
commit 8e6274a88a
2 changed files with 11 additions and 18 deletions

View File

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