feat: keep inventory of bedselections
This commit is contained in:
committed by
Michael Zetterberg
parent
39b89c5d51
commit
5ca30d02a0
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user