Update useBreakpoint.ts

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
Charles de Dreuille
2025-01-21 12:58:50 +00:00
parent 8a4b964d2e
commit 75e92648f3
@@ -26,6 +26,7 @@ export const breakpoints: { name: string; id: Breakpoint; value: number }[] = [
];
export const useBreakpoint = (): Breakpoint => {
// TODO: Perhaps refactor for useMediaQuery to accept an array of queries
const matches = breakpoints.map(breakpoint => {
const match = useMediaQuery(`(min-width: ${breakpoint.value}px)`);
return match;