Files
twenty/front/src/modules/ui/layout/hooks/useIsSubMenuNavbarDisplayed.ts
Lucas Bordeau 21d5133564 Feat/improve mobile display (#843)
* Ok 1

* Finished

* Fix PR

* Fix PR

* Fix desktop

* Fix

* Fix absolute listen click outside

* console.log

* Fix according to code review

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-07-23 10:53:35 -07:00

7 lines
199 B
TypeScript

import { useLocation } from 'react-router-dom';
export function useIsSubMenuNavbarDisplayed() {
const currentPath = useLocation().pathname;
return currentPath.match(/\/settings\//g) !== null;
}