mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-17 13:46:47 +02:00
13 lines
379 B
TypeScript
13 lines
379 B
TypeScript
import { useUiFlag } from './useUiFlag';
|
|
import { useLocation } from 'react-router';
|
|
|
|
export const useNewAdminMenu = () => {
|
|
const newAdminUIEnabled = useUiFlag('adminNavUI');
|
|
const location = useLocation();
|
|
return (
|
|
newAdminUIEnabled &&
|
|
(location.pathname.indexOf('/admin') === 0 ||
|
|
location.pathname.indexOf('/history') === 0)
|
|
);
|
|
};
|