mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-15 02:54:06 +02:00
Co-authored-by: ConnorYoh <[email protected]> Co-authored-by: Connor Yoh <[email protected]> Co-authored-by: EthanHealy01 <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
18 lines
493 B
TypeScript
18 lines
493 B
TypeScript
import { useMediaQuery } from '@mantine/hooks';
|
|
|
|
/**
|
|
* Custom hook to detect mobile viewport
|
|
* Uses a consistent breakpoint across the application
|
|
*/
|
|
export const useIsMobile = (): boolean => {
|
|
return useMediaQuery('(max-width: 1024px)') ?? false;
|
|
};
|
|
|
|
/**
|
|
* Custom hook to detect phone-sized viewport (≤768px)
|
|
* Use for layouts that need a more compact single-column arrangement
|
|
*/
|
|
export const useIsPhone = (): boolean => {
|
|
return useMediaQuery('(max-width: 768px)') ?? false;
|
|
};
|