Files
cinny/src/app/hooks/router/useCreateSelected.ts
T

13 lines
274 B
TypeScript
Raw Normal View History

2025-08-05 18:37:07 +05:30
import { useMatch } from 'react-router-dom';
import { getCreatePath } from '../../pages/pathUtils';
export const useCreateSelected = (): boolean => {
const match = useMatch({
path: getCreatePath(),
caseSensitive: true,
end: false,
});
return !!match;
};