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;