RC-7: remove useless files
This commit is contained in:
@@ -1,39 +0,0 @@
|
|||||||
import { forwardRef, useState } from 'react';
|
|
||||||
import { styled } from '@mui/material/styles';
|
|
||||||
import { convertToRaw, EditorState } from 'draft-js';
|
|
||||||
import { Editor } from 'react-draft-wysiwyg';
|
|
||||||
import draftToHtml from 'draftjs-to-html';
|
|
||||||
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
|
|
||||||
import clsx from 'clsx';
|
|
||||||
|
|
||||||
const Root = styled('div')({
|
|
||||||
'& .rdw-dropdown-selectedtext': {
|
|
||||||
color: 'inherit',
|
|
||||||
},
|
|
||||||
'& .rdw-editor-toolbar': {
|
|
||||||
borderWidth: '0 0 1px 0!important',
|
|
||||||
margin: '0!important',
|
|
||||||
},
|
|
||||||
'& .rdw-editor-main': {
|
|
||||||
padding: '8px 12px',
|
|
||||||
height: `${256}px!important`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const WYSIWYGEditor = forwardRef((props, ref) => {
|
|
||||||
const [editorState, setEditorState] = useState(EditorState.createEmpty());
|
|
||||||
|
|
||||||
function onEditorStateChange(_editorState) {
|
|
||||||
setEditorState(_editorState);
|
|
||||||
|
|
||||||
return props.onChange(draftToHtml(convertToRaw(_editorState.getCurrentContent())));
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Root className={clsx('rounded-4 border-1 overflow-hidden w-full', props.className)} ref={ref}>
|
|
||||||
<Editor editorState={editorState} onEditorStateChange={onEditorStateChange} />
|
|
||||||
</Root>
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
export default WYSIWYGEditor;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
const linksConfigLayout2 = ['rent-and-buy', 'about-us', 'blog', 'contacts'];
|
|
||||||
|
|
||||||
export default linksConfigLayout2;
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
const en = {
|
|
||||||
translation: {},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default en;
|
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
import i18n from 'i18next';
|
import i18n from 'i18next';
|
||||||
import { initReactI18next } from 'react-i18next';
|
import { initReactI18next } from 'react-i18next';
|
||||||
import en from './assets/locales/en';
|
|
||||||
|
|
||||||
|
// the translations
|
||||||
|
// (tip move them in a JSON file and import them)
|
||||||
const resources = {
|
const resources = {
|
||||||
en,
|
en: {
|
||||||
|
translation: {},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
i18n
|
i18n
|
||||||
|
|||||||
Reference in New Issue
Block a user