mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
52c673261b
* Add JSDoc to hooks in app/hooks directory * lint --------- Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com> Co-authored-by: Tom Moor <tom.moor@gmail.com>
12 lines
361 B
TypeScript
12 lines
361 B
TypeScript
import { breakpoints } from "@shared/styles";
|
|
import useMediaQuery from "~/hooks/useMediaQuery";
|
|
|
|
/**
|
|
* Hook to detect if the current viewport is mobile-sized.
|
|
*
|
|
* @returns boolean indicating whether the current viewport is mobile-sized
|
|
*/
|
|
export default function useMobile(): boolean {
|
|
return useMediaQuery(`(max-width: ${breakpoints.tablet - 1}px)`);
|
|
}
|