Skip to content

Commit

Permalink
[native] use HeaderBackButton in QR Auth Flow to support light theme
Browse files Browse the repository at this point in the history
Summary:
Part of [ENG-9959](https://linear.app/comm/issue/ENG-9959/improve-scanning-qr-code-flow).

Tracked in [ENG-10025](https://linear.app/comm/issue/ENG-10025/make-qr-flow-darklight-theme-consistent-with-registration-flow).

Note: The copy needs to be updated, I need to rebase the stack

Example:
{F3481493}

Depends on D14161

Test Plan: Test flow in light mode

Reviewers: ashoat, tomek

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D14162
  • Loading branch information
xsanm committed Dec 18, 2024
1 parent 5e9bd8a commit 1afe13a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions native/account/qr-auth/qr-auth-navigator.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import QRAuthNotPrimaryDevice from './qr-auth-not-primary-device.react.js';
import SecondaryDeviceConnected from './secondary-device-connected.react.js';
import SecondaryDeviceNotResponding from './secondary-device-not-responding.react.js';
import SecondaryDeviceQRCodeScanner from './secondary-device-qr-code-scanner.react.js';
import HeaderBackButton from '../../navigation/header-back-button.react.js';
import HeaderCloseLeftButton from '../../navigation/header-close-left-button.react.js';
import type { RootNavigationProp } from '../../navigation/root-navigator.react.js';
import {
Expand Down Expand Up @@ -70,6 +71,9 @@ const disableGesturesScreenOptions = {
headerLeft: null,
gestureEnabled: false,
};
const overrideHeaderBackButton = {
headerLeft: HeaderBackButton,
};

// eslint-disable-next-line no-unused-vars
function QRAuthNavigator(props: Props): React.Node {
Expand All @@ -84,10 +88,12 @@ function QRAuthNavigator(props: Props): React.Node {
<QRAuthStack.Screen
name={QRAuthNotPrimaryDeviceRouteName}
component={QRAuthNotPrimaryDevice}
options={overrideHeaderBackButton}
/>
<QRAuthStack.Screen
name={ConnectSecondaryDeviceRouteName}
component={ConnectSecondaryDevice}
options={overrideHeaderBackButton}
/>
<QRAuthStack.Screen
name={SecondaryDeviceConnectedRouteName}
Expand Down

0 comments on commit 1afe13a

Please sign in to comment.