(mediaQueryLists: MediaQueryList[])
| 22 | queries.map((q) => window.matchMedia(q)); |
| 23 | |
| 24 | const getValue = (mediaQueryLists: MediaQueryList[]) => { |
| 25 | const index = mediaQueryLists.findIndex((mql) => mql.matches); |
| 26 | return values?.[index] || defaultValue; |
| 27 | }; |
| 28 | |
| 29 | const [value, setValue] = useState<T>(() => { |
| 30 | if (afterHydration && !hydrated) { |