feat: keep inventory of bedselections

This commit is contained in:
Simon Emanuelsson
2025-05-16 16:58:53 +02:00
committed by Michael Zetterberg
parent 39b89c5d51
commit 5ca30d02a0
12 changed files with 153 additions and 47 deletions

View File

@@ -23,15 +23,13 @@ export default function AvailabilityError() {
})
useEffect(() => {
if (!hasAvailabilityError) {
return
if (hasAvailabilityError) {
toast.error(errorMessage)
const newParams = new URLSearchParams(searchParams.toString())
newParams.delete("errorCode")
window.history.replaceState({}, "", `${pathname}?${newParams.toString()}`)
}
toast.error(errorMessage)
const newParams = new URLSearchParams(searchParams.toString())
newParams.delete("errorCode")
window.history.replaceState({}, "", `${pathname}?${newParams.toString()}`)
}, [errorMessage, hasAvailabilityError, pathname, searchParams])
return null