(mediaQueryLists: MediaQueryList[])
| 11 | queries.map((q) => window.matchMedia(q)); |
| 12 | |
| 13 | const getValue = (mediaQueryLists: MediaQueryList[]) => { |
| 14 | const index = mediaQueryLists.findIndex((mql) => mql.matches); |
| 15 | return values?.[index] || defaultValue; |
| 16 | }; |
| 17 | |
| 18 | const [value, setValue] = useState<T>(() => { |
| 19 | if (afterHydration) { |