From d8d59ac6a353b26591524e2c8d1f080961723424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Furkan=20K=C4=B1l=C4=B1c=CC=A7?= Date: Sat, 12 Dec 2020 23:56:31 +0300 Subject: [PATCH] Remove close button for search in community modal --- .../container/selectCommunityModalContainer.js | 5 +---- .../view/selectCommunityModalView.js | 7 +------ .../searchInput/view/searchInputStyles.js | 2 +- .../searchInput/view/searchInputView.js | 16 +++++++++------- src/screens/editor/screen/editorScreen.js | 5 +---- 5 files changed, 13 insertions(+), 22 deletions(-) diff --git a/src/components/editorElements/selectCommunityModal/container/selectCommunityModalContainer.js b/src/components/editorElements/selectCommunityModal/container/selectCommunityModalContainer.js index 8027dcb36..3c9e876be 100644 --- a/src/components/editorElements/selectCommunityModal/container/selectCommunityModalContainer.js +++ b/src/components/editorElements/selectCommunityModal/container/selectCommunityModalContainer.js @@ -11,13 +11,11 @@ import SelectCommunityModalView from '../view/selectCommunityModalView'; import { fetchCommunities, fetchCommunitiesSuccess, - fetchCommunitiesFail, fetchSubscribedCommunities, fetchSubscribedCommunitiesSuccess, - fetchSubscribedCommunitiesFail, } from '../../../../redux/actions/communitiesAction'; -const SelectCommunityModalContainer = ({ onPressCommunity, onPressCloseForSearch }) => { +const SelectCommunityModalContainer = ({ onPressCommunity }) => { const dispatch = useDispatch(); const [searchedCommunities, setSearchedCommunities] = useState([]); @@ -77,7 +75,6 @@ const SelectCommunityModalContainer = ({ onPressCommunity, onPressCloseForSearch topCommunities={topCommunities} subscribedCommunities={subscribedCommunities} onChangeSearch={debounce(handleChangeSearch, 500)} - onPressCloseForSearch={handlePressCloseForSearch} searchedCommunities={searchedCommunities} showSearchedCommunities={showSearchedCommunities} /> diff --git a/src/components/editorElements/selectCommunityModal/view/selectCommunityModalView.js b/src/components/editorElements/selectCommunityModal/view/selectCommunityModalView.js index abb851e74..6fdfa0bf8 100644 --- a/src/components/editorElements/selectCommunityModal/view/selectCommunityModalView.js +++ b/src/components/editorElements/selectCommunityModal/view/selectCommunityModalView.js @@ -19,12 +19,7 @@ const SelectCommunityModalView = ({ }) => { return ( - + {showSearchedCommunities ? ( } diff --git a/src/components/searchInput/view/searchInputStyles.js b/src/components/searchInput/view/searchInputStyles.js index d18e9ef6e..ea1af2e58 100644 --- a/src/components/searchInput/view/searchInputStyles.js +++ b/src/components/searchInput/view/searchInputStyles.js @@ -8,7 +8,7 @@ export default EStyleSheet.create({ height: 44, borderRadius: 8, padding: 5, - justifyContent: 'center', + justifyContent: 'flex-start', marginHorizontal: 16, }, icon: { diff --git a/src/components/searchInput/view/searchInputView.js b/src/components/searchInput/view/searchInputView.js index 619581fb0..629dc2675 100644 --- a/src/components/searchInput/view/searchInputView.js +++ b/src/components/searchInput/view/searchInputView.js @@ -34,13 +34,15 @@ const SearchInputView = ({ autoFocus={autoFocus} editable={editable} /> - handleOnModalClose()} - /> + {handleOnModalClose && ( + handleOnModalClose()} + /> + )} ); diff --git a/src/screens/editor/screen/editorScreen.js b/src/screens/editor/screen/editorScreen.js index 929c05e81..a2b01dce8 100644 --- a/src/screens/editor/screen/editorScreen.js +++ b/src/screens/editor/screen/editorScreen.js @@ -280,10 +280,7 @@ class EditorScreen extends Component { presentationStyle="pageSheet" style={styles.modal} > - this.setState({ isCommunitiesListModalOpen: false })} - /> + handleDatePickerChange(date, fields)}