EditorSettings.tsx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { memo } from 'react';
  2. export const EditorSettings = memo((): JSX.Element => {
  3. // const { t } = useTranslation();
  4. // const { data: dataEditorSettings, update: updateEditorSettings } = useEditorSettings();
  5. // const updateRulesHandler = useCallback(async() => {
  6. // try {
  7. // await updateEditorSettings({ textlintSettings: { textlintRules } });
  8. // toastSuccess(t('toaster.update_successed', { target: 'Updated Textlint Settings', ns: 'commons' }));
  9. // }
  10. // catch (err) {
  11. // toastError(err);
  12. // }
  13. // }, [t, textlintRules, updateEditorSettings]);
  14. // useEffect(() => {
  15. // initializeEditorSettings();
  16. // }, [initializeEditorSettings]);
  17. return (
  18. <div data-testid="grw-editor-settings">
  19. {/*
  20. <div className="row my-3">
  21. <div className="offset-4 col-5">
  22. <button
  23. data-testid="grw-editor-settings-update-button"
  24. type="button"
  25. className="btn btn-primary"
  26. onClick={updateRulesHandler}
  27. >
  28. {t('Update')}
  29. </button>
  30. </div>
  31. </div>
  32. */}
  33. </div>
  34. );
  35. });
  36. EditorSettings.displayName = 'EditorSettings';