diff --git a/src/views/Profile/AdminTable/AdminTextField.tsx b/src/views/Profile/AdminTable/AdminTextField.tsx index 7ee90e01e..13df748c8 100644 --- a/src/views/Profile/AdminTable/AdminTextField.tsx +++ b/src/views/Profile/AdminTable/AdminTextField.tsx @@ -3,7 +3,6 @@ import FormControl from '@material-ui/core/FormControl'; import TextField from '@material-ui/core/TextField'; import { FieldEnum, IField } from '../../../models/adminLab/types'; - interface IMaterialsTextField { field: FieldEnum; setChanges: (payload: IField) => void; diff --git a/src/views/Profile/AdminTable/styles/AdminTableBody.styles.ts b/src/views/Profile/AdminTable/styles/AdminTableBody.styles.ts index b4c87c0f9..af61d8fa9 100644 --- a/src/views/Profile/AdminTable/styles/AdminTableBody.styles.ts +++ b/src/views/Profile/AdminTable/styles/AdminTableBody.styles.ts @@ -33,4 +33,3 @@ export const useStyles = makeStyles( }), { name: 'AdminTableBody' }, ); - diff --git a/src/views/postUpdation/AllPostTypesUpdation.tsx b/src/views/postUpdation/AllPostTypesUpdation.tsx index 237e77ee8..afdb4b52a 100644 --- a/src/views/postUpdation/AllPostTypesUpdation.tsx +++ b/src/views/postUpdation/AllPostTypesUpdation.tsx @@ -100,7 +100,9 @@ export const AllPostTypesUpdation: React.FC = ({ const postCurrentState = { title: title.value, - htmlContent: htmlContent.replaceAll(CLEAR_HTML_REG_EXP, ''), + htmlContent: htmlContent + .replaceAll(CLEAR_HTML_REG_EXP, '') + .replace(/ +/g, ' '), preview, selectedDirections, selectedOrigins, @@ -112,7 +114,9 @@ export const AllPostTypesUpdation: React.FC = ({ const postInitialState = useRef({ title: post.title, - htmlContent: post.content.replaceAll(CLEAR_HTML_REG_EXP, ''), + htmlContent: post.content + .replaceAll(CLEAR_HTML_REG_EXP, '') + .replace(/ +/g, ' '), preview: post.preview, selectedDirections: post.directions, selectedOrigins: post.origins,