فهرست منبع

Changing where gettranslation is used

WNomunomu 2 سال پیش
والد
کامیت
9850f66949
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      packages/editor/src/components/CodeMirrorEditor/Toolbar/EmojiButton.tsx

+ 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;