mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-16 10:16:20 +01:00
🚑 Fix sidebar ribbons breakpoint
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
import { MantineSize, useMantineTheme } from '@mantine/core';
|
import { MantineSize, useMantineTheme } from '@mantine/core';
|
||||||
import { useMediaQuery } from '@mantine/hooks';
|
import { useMediaQuery } from '@mantine/hooks';
|
||||||
import { MIN_WIDTH_MOBILE } from '../constants/constants';
|
|
||||||
|
|
||||||
export const useScreenLargerThan = (size: MantineSize | number) => {
|
export const useScreenLargerThan = (size: MantineSize | number) => {
|
||||||
const { breakpoints } = useMantineTheme();
|
const { breakpoints } = useMantineTheme();
|
||||||
const pixelCount = typeof size === 'string' ? breakpoints[size] : size;
|
const pixelCount = typeof size === 'string' ? breakpoints[size] : size;
|
||||||
return useMediaQuery(`(min-width: ${MIN_WIDTH_MOBILE})`);
|
return useMediaQuery(`(min-width: ${pixelCount})`);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user