Page MenuHomePhabricator

D6009.id20060.diff
No OneTemporary

D6009.id20060.diff

diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -556,7 +556,7 @@
let siwePanel;
if (this.state.mode === 'siwe') {
- siwePanel = <SIWEPanel />;
+ siwePanel = <SIWEPanel onClose={this.goBackToPrompt} />;
}
const backgroundSource = { uri: splashBackgroundURI };
diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js
--- a/native/account/siwe-panel.react.js
+++ b/native/account/siwe-panel.react.js
@@ -29,7 +29,10 @@
getSIWENonceActionTypes,
);
-function SIWEPanel(): React.Node {
+type Props = {
+ +onClose: () => mixed,
+};
+function SIWEPanel(props: Props): React.Node {
const navContext = React.useContext(NavContext);
const dispatchActionPromise = useDispatchActionPromise();
const registerAction = useServerCall(register);
@@ -129,6 +132,16 @@
[],
);
+ const { onClose } = props;
+ const onBottomSheetChange = React.useCallback(
+ (index: number) => {
+ if (index === -1) {
+ onClose();
+ }
+ },
+ [onClose],
+ );
+
let bottomSheet;
if (nonce) {
bottomSheet = (
@@ -136,6 +149,8 @@
snapPoints={snapPoints}
backgroundStyle={handleStyle}
handleIndicatorStyle={bottomSheetHandleIndicatorStyle}
+ enablePanDownToClose={true}
+ onChange={onBottomSheetChange}
>
<WebView
source={source}

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 7, 1:51 AM (22 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2252025
Default Alt Text
D6009.id20060.diff (1 KB)

Event Timeline