Skip to content

Commit

Permalink
fix back button (111)
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Jan 18, 2024
1 parent e7d3044 commit 401f2c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pages/NewChatSelectorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import TabSelector from '@components/TabSelector/TabSelector';
import withLocalize, {withLocalizePropTypes} from '@components/withLocalize';
import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions';
import compose from '@libs/compose';
import Navigation from '@libs/Navigation/Navigation';
import OnyxTabNavigator, {TopTab} from '@libs/Navigation/OnyxTabNavigator';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -33,7 +34,10 @@ function NewChatSelectorPage(props) {
shouldEnableMaxHeight
testID={NewChatSelectorPage.displayName}
>
<HeaderWithBackButton title={props.translate('sidebarScreen.fabNewChat')} />
<HeaderWithBackButton
title={props.translate('sidebarScreen.fabNewChat')}
onBackButtonPress={() => Navigation.dismissModal()}
/>
<OnyxTabNavigator
id={CONST.TAB.NEW_CHAT_TAB_ID}
tabBar={({state, navigation, position}) => (
Expand All @@ -59,7 +63,7 @@ function NewChatSelectorPage(props) {

NewChatSelectorPage.propTypes = propTypes;
NewChatSelectorPage.defaultProps = defaultProps;
NewChatSelectorPage.displayName = 'NewChatPage';
NewChatSelectorPage.displayName = 'NewChatSelectorPage';

export default compose(
withLocalize,
Expand Down

0 comments on commit 401f2c1

Please sign in to comment.