Merged in fix/intl-global-error (pull request #1510)

Fix: Error message when copy fail. Null check on localstorage. Removed Intl from global-error.tsx

* Error message if failed to copy

* Use try/catch instead


Approved-by: Joakim Jäderberg
This commit is contained in:
Linus Flood
2025-03-11 10:49:56 +00:00
parent 2ef2b2e28d
commit 7563db9dbc
11 changed files with 26 additions and 11 deletions

View File

@@ -131,6 +131,8 @@ export default function Search({ locations, handlePressEnter }: SearchProps) {
}
useEffect(() => {
if (!window?.sessionStorage || !window?.localStorage) return
const searchData = sessionStorage.getItem(sessionStorageKey)
const searchHistory = localStorage.getItem(localStorageKey)
const payload: SetStorageData["payload"] = {}