Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3376181
D11484.id38565.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11484.id38565.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,31 +1,49 @@
// @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');
+
+ const { fid } = fidContext;
+
const styles = useStyles(unboundStyles);
+ const headerText = fid
+ ? 'Disconnect from Farcaster'
+ : 'Do you want to connect your Farcaster account';
+
+ const bodyText = fid
+ ? '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 ' +
+ 'channels.';
+
const farcasterPrompt = React.useMemo(
() => (
<>
- <Text style={styles.header}>
- Do you want to connect your Farcaster account?
- </Text>
- <Text style={styles.body}>
- Connecting your Farcaster account lets you see your mutual follows on
- Comm. We’ll also surface communities based on your Farcaster
- channels.
- </Text>
+ <Text style={styles.header}>{headerText}</Text>
+ <Text style={styles.body}>{bodyText}</Text>
<View style={styles.farcasterLogoContainer}>
<FarcasterLogo />
</View>
</>
),
- [styles.body, styles.farcasterLogoContainer, styles.header],
+ [
+ bodyText,
+ headerText,
+ styles.body,
+ styles.farcasterLogoContainer,
+ styles.header,
+ ],
);
return farcasterPrompt;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 10:30 PM (19 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2591938
Default Alt Text
D11484.id38565.diff (1 KB)
Attached To
Mode
D11484: [native] update FarcasterPrompt based on if the fid is set or not
Attached
Detach File
Event Timeline
Log In to Comment