🧑‍💻 Address PR comments

This commit is contained in:
ajnart
2023-03-21 11:26:19 +08:00
parent 1aeee38c0d
commit 3bb0f20066
3 changed files with 7 additions and 8 deletions

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: 500px)');
return useMediaQuery(`(min-width: ${MIN_WIDTH_MOBILE})`);
};