🔀 Merge branch 'dev' into tests/add-tests

This commit is contained in:
Manuel committed 2023-03-29 12:17:20 +02:00
commit 3f44c59e00
50 files changed
+1035 -910

No files matched your search

+2 -1
View File
@@ -1,8 +1,9 @@
import { MantineSize, useMantineTheme } from '@mantine/core';
import { useMediaQuery } from '@mantine/hooks';
import { MIN_WIDTH_MOBILE } from '../constants/constants';
export const useScreenLargerThan = (size: MantineSize | number) => {
const { breakpoints } = useMantineTheme();
const pixelCount = typeof size === 'string' ? breakpoints[size] : size;
return useMediaQuery(`(min-width: ${pixelCount}px)`);
return useMediaQuery(`(min-width: ${MIN_WIDTH_MOBILE})`);
};