Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / components / hooks / useDisplayContactsWidget.ts
blob0f0aa8612f2ce16722aabd642c21b80492135a70
1 import useActiveBreakpoint from '@proton/components/hooks/useActiveBreakpoint';
2 import useConfig from '@proton/components/hooks/useConfig';
3 import { getDisplayContactsInDrawer } from '@proton/shared/lib/drawer/helpers';
5 const useDisplayContactsWidget = () => {
6     const { viewportWidth } = useActiveBreakpoint();
7     const { APP_NAME } = useConfig();
9     const displayContactsInDrawer = getDisplayContactsInDrawer(APP_NAME);
11     // We want to display contacts in the header if window is too small to display Drawer
12     return !displayContactsInDrawer || viewportWidth['<=small'];
15 export default useDisplayContactsWidget;