Просмотр исходного кода

Changing where gettranslation is used

WNomunomu 2 лет назад
Родитель
Сommit
9850f66949

+ 2 - 2
packages/editor/src/components/CodeMirrorEditor/Toolbar/EmojiButton.tsx

@@ -66,6 +66,8 @@ const getEmojiTranslation = (): Translation => {
   return translation;
 };
 
+const translation = getEmojiTranslation();
+
 export const EmojiButton: FC<Props> = (props) => {
   const { editorKey } = props;
 
@@ -98,8 +100,6 @@ export const EmojiButton: FC<Props> = (props) => {
     return <></>;
   }
 
-  const translation = getEmojiTranslation();
-
   const setStyle = (): CSSProperties => {
     const offset = 20;
     const emojiPickerHeight = 420;