Spaces:
Runtime error
Runtime error
Download src/lib/utils/isDesktop.ts from evijit/pluralchat: direct link, hf CLI and curl.
- Browser
- Download file 211 Bytes
-
https://huggingface.co/spaces/evijit/pluralchat/resolve/refs%2Fpr%2F1/src/lib/utils/isDesktop.ts
- Command line
-
hf download hf://spaces/evijit/pluralchat@refs/pr/1/src/lib/utils/isDesktop.ts
-
curl -L -o isDesktop.ts https://huggingface.co/spaces/evijit/pluralchat/resolve/refs%2Fpr%2F1/src/lib/utils/isDesktop.ts
211 Bytes
| // Approximate width from which we disable autofocus | |
| const TABLET_VIEWPORT_WIDTH = 768; | |
| export function isDesktop(window: Window) { | |
| const { innerWidth } = window; | |
| return innerWidth > TABLET_VIEWPORT_WIDTH; | |
| } | |