(key: string)
| 30 | } |
| 31 | |
| 32 | const getStorage = (key: string) => { |
| 33 | if (typeof localStorage === "undefined") return null |
| 34 | try { |
| 35 | return localStorage.getItem(key) |
| 36 | } catch { |
| 37 | return null |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | const setStorage = (key: string, value: string | null) => { |
| 42 | if (typeof localStorage === "undefined") return |
no test coverage detected