diff --git a/src/components/basicHeader/view/basicHeaderView.js b/src/components/basicHeader/view/basicHeaderView.tsx
similarity index 66%
rename from src/components/basicHeader/view/basicHeaderView.js
rename to src/components/basicHeader/view/basicHeaderView.tsx
index e603b01bf..c11fcab65 100644
--- a/src/components/basicHeader/view/basicHeaderView.js
+++ b/src/components/basicHeader/view/basicHeaderView.tsx
@@ -1,15 +1,12 @@
import React, { useState, Fragment, useRef } from 'react';
import { View, Text, ActivityIndicator, SafeAreaView } from 'react-native';
import { injectIntl } from 'react-intl';
-import { useSelector } from 'react-redux';
-import moment from 'moment';
// Components
-import { TextButton, Modal, BeneficiaryModal } from '../..';
+import { TextButton } from '../..';
import { IconButton } from '../../iconButton';
import { DropdownButton } from '../../dropdownButton';
import { TextInput } from '../../textInput';
-import { DateTimePicker } from '../../dateTimePicker';
// Constants
// Styles
@@ -28,7 +25,6 @@ const BasicHeaderView = ({
intl,
isDraftSaved,
isDraftSaving,
- draftId,
isFormValid,
isHasDropdown,
isHasIcons,
@@ -46,23 +42,14 @@ const BasicHeaderView = ({
title,
handleOnSubmit,
handleOnSearch,
- handleDatePickerChange,
handleRewardChange,
- handleBeneficiaries,
enableViewModeToggle,
handleSettingsPress,
- showThumbSelectionModal,
}) => {
+
const [isInputVisible, setIsInputVisible] = useState(false);
- const [beneficiaryModal, setBeneficiaryModal] = useState(false);
- const [showScheduleModal, setShowScheduleModal] = useState(false);
- const [scheduledDate, setScheduledDate] = useState('');
-
- const username = useSelector((state) => state.account.currentAccount.name);
-
- const settingMenuRef = useRef(null);
const rewardMenuRef = useRef(null);
- const scheduleRef = useRef(null);
+
/**
*
@@ -90,27 +77,6 @@ const BasicHeaderView = ({
handleOnSearch(value);
};
- const _handleSettingMenuSelect = (index) => {
- switch (index) {
- case 0:
- setShowScheduleModal(true);
- break;
- case 1:
- if (showThumbSelectionModal) {
- showThumbSelectionModal();
- }
- break;
- case 2:
- rewardMenuRef.current.show();
- break;
- case 3:
- setBeneficiaryModal(true);
- break;
-
- default:
- break;
- }
- };
const _handleRewardMenuSelect = (index) => {
let rewardType = 'default';
@@ -131,32 +97,7 @@ const BasicHeaderView = ({
}
};
- const _handleOnSaveBeneficiaries = (beneficiaries) => {
- const _beneficiaries = beneficiaries.map((item) => ({
- account: item.account,
- weight: item.weight,
- }));
- setBeneficiaryModal(false);
- if (handleBeneficiaries) {
- handleBeneficiaries(_beneficiaries);
- }
- };
- const _handleDatePickerChange = (datePickerValue) => {
- setScheduledDate(datePickerValue);
- };
-
- const _onPressDone = () => {
- let dateString = scheduledDate;
-
- if (dateString === '') {
- dateString = moment().format();
- }
-
- setScheduledDate('');
- handleDatePickerChange(dateString);
- setShowScheduleModal(false);
- };
/**
*
@@ -291,57 +232,8 @@ const BasicHeaderView = ({
)}
- setBeneficiaryModal(false)}
- title={intl.formatMessage({ id: 'editor.beneficiaries' })}
- animationType="slide"
- style={styles.beneficiaryModal}
- >
-
-
- setShowScheduleModal(false)}
- >
-
-
-
-
-
+
+
+
);
};
diff --git a/src/components/uploadsGalleryModal/uploadsGalleryModal.tsx b/src/components/uploadsGalleryModal/uploadsGalleryModal.tsx
index 43ea05663..507fb2153 100644
--- a/src/components/uploadsGalleryModal/uploadsGalleryModal.tsx
+++ b/src/components/uploadsGalleryModal/uploadsGalleryModal.tsx
@@ -283,8 +283,6 @@ export const UploadsGalleryModal = forwardRef(({
}
-
-
return (
{
- const { fields } = this.state;
- if (this.thumbSelectionModalRef) {
- this.thumbSelectionModalRef.show(fields.body);
- }
- };
_handleScheduleChange = (datetime:string|null) => {
this.setState({
@@ -406,8 +399,8 @@ class EditorScreen extends Component {
);
};
-console.log('fields :', fields);
-console.log('quickReplyText : ', quickReplyText);
+
+
return (
@@ -430,7 +423,6 @@ console.log('quickReplyText : ', quickReplyText);
isReply={isReply}
quickTitle={wordsCount > 0 && `${wordsCount} words`}
rightButtonText={rightButtonText}
- showThumbSelectionModal={this._showThumbSelectionModal}
handleSettingsPress={this._handleSettingsPress}
/>
+
{_renderCommunityModal()}
- (this.thumbSelectionModalRef = componentRef)}
- thumbIndex={thumbIndex}
- onThumbSelection={this._handleOnThumbSelection}
- />
+
(this.postOptionsModalRef = componentRef)}
body={fields.body}