import React, { useEffect } from 'react';
// HACK 用于消除csv编辑器快捷键与平台冲突，后续使用时请包裹到与使用csv组件的最近子组件外
const EliminateShortcutKeyConflicts = ({ children }) => {
  useEffect(() => {
    Mousetrap.pause();
    localStorage.removeItem('easyv_component');
    return () => {
      Mousetrap.unpause();
    };
  }, []);
  return children;
};

export default EliminateShortcutKeyConflicts;
