Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3400856
D11597.id38948.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11597.id38948.diff
View Options
diff --git a/native/components/farcaster-prompt.react.js b/native/components/farcaster-prompt.react.js
--- a/native/components/farcaster-prompt.react.js
+++ b/native/components/farcaster-prompt.react.js
@@ -1,27 +1,25 @@
// @flow
-import invariant from 'invariant';
import * as React from 'react';
import { View, Text } from 'react-native';
-import { FIDContext } from 'lib/components/fid-provider.react.js';
-
import { useStyles } from '../themes/colors.js';
import FarcasterLogo from '../vectors/farcaster-logo.react.js';
-function FarcasterPrompt(): React.Node {
- const fidContext = React.useContext(FIDContext);
- invariant(fidContext, 'fidContext is missing');
+type Props = {
+ +showDisconnectText?: boolean,
+};
- const { fid } = fidContext;
+function FarcasterPrompt(props: Props): React.Node {
+ const { showDisconnectText } = props;
const styles = useStyles(unboundStyles);
- const headerText = fid
+ const headerText = showDisconnectText
? 'Disconnect from Farcaster'
: 'Do you want to connect your Farcaster account';
- const bodyText = fid
+ const bodyText = showDisconnectText
? 'You can disconnect your Farcaster account at any time.'
: 'Connecting your Farcaster account lets you see your mutual follows ' +
'on Comm. We’ll also surface communities based on your Farcaster ' +
diff --git a/native/profile/farcaster-account-settings.react.js b/native/profile/farcaster-account-settings.react.js
--- a/native/profile/farcaster-account-settings.react.js
+++ b/native/profile/farcaster-account-settings.react.js
@@ -74,7 +74,7 @@
() => (
<View style={styles.connectContainer}>
<View style={styles.promptContainer}>
- <FarcasterPrompt />
+ <FarcasterPrompt showDisconnectText={!!fid} />
</View>
<FarcasterWebView onSuccess={onSuccess} webViewState={webViewState} />
<View style={styles.buttonContainer}>{button}</View>
@@ -82,6 +82,7 @@
),
[
button,
+ fid,
onSuccess,
styles.buttonContainer,
styles.connectContainer,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 9:13 AM (19 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611138
Default Alt Text
D11597.id38948.diff (2 KB)
Attached To
Mode
D11597: [native] flip farcaster prompt based on fid prop instead of context
Attached
Detach File
Event Timeline
Log In to Comment