WNomunomu 2 лет назад
Родитель
Сommit
78401d8866

+ 0 - 29
apps/app/src/stores/modal.tsx

@@ -739,32 +739,3 @@ export const useLinkEditModal = (): SWRResponse<LinkEditModalStatus, Error> & Li
     },
   });
 };
-
-
-/*
-* EmojiPickerModal
-*/
-type EmojiPickerModalStatus = {
-  isOpend: boolean,
-}
-
-type EmojiPickerModalUtils = {
-  open(): void,
-  close(): void,
-}
-
-export const useEmojiPickerModal = (): SWRResponse<EmojiPickerModalStatus, Error> & EmojiPickerModalUtils => {
-
-  const initialStatus = { isOpened: false };
-  const swrResponse = useStaticSWR<EmojiPickerModalStatus, Error>('emojiPickerModal', undefined, { fallbackData: initialStatus });
-
-  return {
-    ...swrResponse,
-    open: () => {
-      swrResponse.mutate({ isOpened: true });
-    },
-    close: () => {
-      swrResponse.mutate({ isOpened: false });
-    },
-  };
-};

+ 1 - 3
packages/editor/src/components/CodeMirrorEditor/CodeMirrorEditor.tsx

@@ -1,12 +1,10 @@
 import {
-  forwardRef, useMemo, useRef, useEffect, useCallback,
+  forwardRef, useMemo, useRef, useEffect,
 } from 'react';
 
 import { indentUnit } from '@codemirror/language';
 import type { ReactCodeMirrorProps } from '@uiw/react-codemirror';
 
-// import { useEmojiPickerModal } from '~/stores/modal';
-
 import { GlobalCodeMirrorEditorKey } from '../../consts';
 import { useCodeMirrorEditorIsolated } from '../../stores';