renamed EditorSettings component to PostOptions

This commit is contained in:
noumantahir 2022-01-06 14:12:03 +05:00
parent 4f96553914
commit e500499521
3 changed files with 12 additions and 12 deletions

View File

@ -3,7 +3,7 @@ import { useIntl } from 'react-intl';
import { View } from 'react-native';
import { DateTimePicker, MainButton, Modal, SettingsItem } from '../../../components';
import styles from './editorSettingsModalStyles';
import styles from './postOptionsModalStyles';
import ThumbSelectionContent from './thumbSelectionContent';
import {View as AnimatedView} from 'react-native-animatable';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
@ -27,12 +27,12 @@ const REWARD_TYPES = [
export interface EditorSettingsModalRef {
export interface PostOptionsModalRef {
showModal:()=>void;
}
interface EditorSettingsModalProps {
interface PostOptionsModalProps {
body:string;
draftId:string;
thumbIndex:number,
@ -44,7 +44,7 @@ interface EditorSettingsModalProps {
handleShouldReblogChange:(shouldReblog:boolean)=>void;
}
const EditorSettingsModal = forwardRef(({
const PostOptionsModal = forwardRef(({
body,
draftId,
thumbIndex,
@ -54,7 +54,7 @@ const EditorSettingsModal = forwardRef(({
handleThumbSelection,
handleScheduleChange,
handleShouldReblogChange,
}: EditorSettingsModalProps, ref) => {
}: PostOptionsModalProps, ref) => {
const intl = useIntl();
const [showModal, setShowModal] = useState(false);
@ -220,4 +220,4 @@ const EditorSettingsModal = forwardRef(({
);
});
export default EditorSettingsModal
export default PostOptionsModal

View File

@ -32,7 +32,7 @@ import { isCommunity } from '../../../utils/communityValidation';
import styles from './editorScreenStyles';
import ThumbSelectionModal from '../children/thumbSelectionModal';
import EditorSettingsModal from '../children/editorSettingsModal';
import PostOptionsModal from '../children/postOptionsModal';
class EditorScreen extends Component {
/* Props
@ -40,7 +40,7 @@ class EditorScreen extends Component {
* @prop { type } name - Description....
*/
thumbSelectionModalRef = null;
editorSettingsModalRef = null;
postOptionsModalRef = null;
constructor(props) {
super(props);
@ -201,8 +201,8 @@ class EditorScreen extends Component {
}
_handleSettingsPress = () => {
if(this.editorSettingsModalRef){
this.editorSettingsModalRef.show();
if(this.postOptionsModalRef){
this.postOptionsModalRef.show();
}
}
@ -458,8 +458,8 @@ class EditorScreen extends Component {
thumbIndex={thumbIndex}
onThumbSelection={this._handleOnThumbSelection}
/>
<EditorSettingsModal
ref={(componentRef) => (this.editorSettingsModalRef = componentRef)}
<PostOptionsModal
ref={(componentRef) => (this.postOptionsModalRef = componentRef)}
body={fields.body}
draftId={draftId}
thumbIndex={thumbIndex}