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 */ /* eslint react/prop-types: 0 */
import React, { useContext, useMemo } from 'react'; import React, { useContext, useMemo } from 'react';
import { isEmpty } from 'lodash';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { WaxContext } from '../WaxContext'; import { WaxContext } from '../WaxContext';
import MenuButton from './ui/MenuButton'; import MenuButton from './ui/MenuButton';
...@@ -36,7 +37,6 @@ const Button = ({ view = {}, item }) => { ...@@ -36,7 +37,6 @@ const Button = ({ view = {}, item }) => {
context.activeView, context.activeView,
); );
if (!isEditable) isDisabled = true; if (!isEditable) isDisabled = true;
const MenuButtonComponent = useMemo( const MenuButtonComponent = useMemo(
() => ( () => (
<MenuButton <MenuButton
...@@ -46,7 +46,7 @@ const Button = ({ view = {}, item }) => { ...@@ -46,7 +46,7 @@ const Button = ({ view = {}, item }) => {
label={label} label={label}
onMouseDown={e => handleMouseDown(e)} onMouseDown={e => handleMouseDown(e)}
title={ title={
i18n.exists(`Wax.Annotations.${title}`) !isEmpty(i18n) && i18n.exists(`Wax.Annotations.${title}`)
? t(`Wax.Annotations.${title}`) ? t(`Wax.Annotations.${title}`)
: 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