Skip to content
Snippets Groups Projects
Commit 1079db95 authored by chris's avatar chris
Browse files

fix

parent 60a982e4
No related branches found
No related tags found
1 merge request!501Translations
/* eslint react/prop-types: 0 */
import React, { useContext, useMemo } from 'react';
import { isEmpty } from 'lodash';
import { useTranslation } from 'react-i18next';
import { WaxContext } from '../WaxContext';
import MenuButton from './ui/MenuButton';
......@@ -36,7 +37,6 @@ const Button = ({ view = {}, item }) => {
context.activeView,
);
if (!isEditable) isDisabled = true;
const MenuButtonComponent = useMemo(
() => (
<MenuButton
......@@ -46,7 +46,7 @@ const Button = ({ view = {}, item }) => {
label={label}
onMouseDown={e => handleMouseDown(e)}
title={
i18n.exists(`Wax.Annotations.${title}`)
!isEmpty(i18n) && i18n.exists(`Wax.Annotations.${title}`)
? t(`Wax.Annotations.${title}`)
: title
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment