Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_handleEvent(name, e) {
const onEvent = this.props[`on${upperCaseFirst(name)}`]
// don't allow button component to trigger onClick
if (this._isKeyDown) return;
this._trigger(e)
if (typeof onEvent === 'function') {
onEvent(e)
}
}
render() {
const { data, router } = this.props;
const { loading, error, folder } = data;
const title = upper(router.asPath.replace('/', ''));
let folderData = false;
if (error) {
return (
Could not load
{title}
);
}
if (loading) {
return ;
}
const { children } = data.tree[0];
const sentenceCase = s => upperCaseFirst(s.toLowerCase())
export function capitalCaseTransform(input: string) {
return upperCaseFirst(input.toLowerCase());
}
function UserRole({ roleName }) {
const { t } = useTranslator();
return (
{t(`roles.${roleName}`, { defaultValue: upperCaseFirst(roleName) })}
);
}