mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 19:16:55 +02:00
Refactor desktop app into separate client and proxy apps
This commit is contained in:
8
apps/yaak-client/hooks/useShouldFloatSidebar.ts
Normal file
8
apps/yaak-client/hooks/useShouldFloatSidebar.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { useWindowSize } from 'react-use';
|
||||
|
||||
const WINDOW_FLOATING_SIDEBAR_WIDTH = 600;
|
||||
|
||||
export function useShouldFloatSidebar() {
|
||||
const windowSize = useWindowSize();
|
||||
return windowSize.width <= WINDOW_FLOATING_SIDEBAR_WIDTH;
|
||||
}
|
||||
Reference in New Issue
Block a user