diff --git a/src/app/pages/settings/contentSettings.js b/src/app/pages/settings/contentSettings.js index 5afd8ba82..570824c1b 100644 --- a/src/app/pages/settings/contentSettings.js +++ b/src/app/pages/settings/contentSettings.js @@ -5,97 +5,6 @@ import AppStore from 'App/data/store'; import { bluehostSettingsApiFetch } from 'App/util/helpers'; import { useNotification } from 'App/components/notifications'; -const ContentRevisions = ( { setError, notify } ) => { - const { store, setStore } = useContext( AppStore ); - const [ contentRevisions, setNumContentRevisions ] = useState( - store.contentRevisions - ); - - const contentRevisionsNoticeTitle = () => { - return __( 'Post revision setting saved ', 'wp-plugin-bluehost' ); - }; - - const contentRevisionsNoticeText = () => { - return ( - __( 'Posts will save ', 'wp-plugin-bluehost' ) + - contentRevisions + - _n( - ' revision.', - ' revisions.', - parseInt( contentRevisions ), - 'wp-plugin-bluehost' - ) - ); - }; - - const contentRevisionsDescriptionText = () => { - return ( - __( - 'Saving drafts and updating published content creates revisions. Make changes with confidence, knowing you can take ', - 'wp-plugin-bluehost' - ) + - contentRevisions + - _n( - ' step back.', - ' steps back.', - parseInt( contentRevisions ), - 'wp-plugin-bluehost' - ) - ); - }; - - const handleContentRevisionsChange = ( value ) => { - bluehostSettingsApiFetch( - { contentRevisions: value }, - setError, - // eslint-disable-next-line no-unused-vars - ( response ) => { - setNumContentRevisions( value ); - } - ); - }; - - const notifySuccess = () => { - notify.push( 'content-revision-notice', { - title: contentRevisionsNoticeTitle(), - description: { contentRevisionsNoticeText() }, - variant: 'success', - autoDismiss: 5000, - } ); - }; - - useUpdateEffect( () => { - setStore( { - ...store, - contentRevisions, - } ); - - notifySuccess(); - }, [ contentRevisions ] ); - - return ( - - ); -}; - const EmptyTrash = ( { setError, notify } ) => { const { store, setStore } = useContext( AppStore ); const [ emptyTrashDays, setNumEmptyTrashDays ] = useState(