-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add test notification * formatting * bad scoping * formatting * identifier * closure * typo * add additional logic for enx notification * typo * remove active check * move enx notification to exposure * modify region and set to pull off env, change styling * fix os recognition of enx component * verbage * add 3 count to prevent showing notification more in 24 hour period * typo * bad math operator * removed constant * move condition * move variable * test * set a redirect post enx * Bump mobile resources * Bumping mobile resources * Update verbiage for migration * Bumping mobile resources * Updating verbiage on migration alerts * Removing app name from notification * Bumping mobile resources * set to 3 times to notify
- Loading branch information
1 parent
2f717a9
commit 634d6af
Showing
16 changed files
with
218 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
35462ce37acd66083c897fc3014cc89d09c231ff | ||
9466165c85fc4c1499b912932c41289b5d1ced5d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import React, { FunctionComponent } from "react" | ||
import { | ||
Linking, | ||
Alert, | ||
TouchableOpacity, | ||
Image, | ||
View, | ||
StyleSheet, | ||
} from "react-native" | ||
import { useTranslation } from "react-i18next" | ||
import { Text } from "../components" | ||
import Logger from "../logger" | ||
import { | ||
Spacing, | ||
Colors, | ||
Typography, | ||
Outlines, | ||
Iconography, | ||
Affordances, | ||
} from "../styles" | ||
import { Icons, Images } from "../assets" | ||
import { SvgXml } from "react-native-svg" | ||
|
||
interface EnxMigrationInfoProps { | ||
enxRegion: string | ||
} | ||
|
||
const EnxMigrationInfo: FunctionComponent<EnxMigrationInfoProps> = ({ | ||
enxRegion, | ||
}) => { | ||
const { t } = useTranslation() | ||
const onboardingUrl = `ens://onboarding?r=${enxRegion}` | ||
|
||
const handleOnPress = async () => { | ||
try { | ||
await Linking.openURL(onboardingUrl) | ||
} catch (e) { | ||
Logger.error("Failed to open enx onboarding link: ", { onboardingUrl }) | ||
const alertMessage = t("home.could_not_open_link", { | ||
url: onboardingUrl, | ||
}) | ||
Alert.alert(alertMessage) | ||
} | ||
} | ||
|
||
return ( | ||
<TouchableOpacity | ||
style={style.shareContainer} | ||
onPress={handleOnPress} | ||
accessibilityLabel={t("home.migrate_enx")} | ||
> | ||
<View style={style.imageContainer}> | ||
<Image source={Images.ExclamationInCircle} style={style.image} /> | ||
</View> | ||
<View style={style.textContainer}> | ||
<Text style={style.shareText}>{t("home.migrate_enx")}</Text> | ||
</View> | ||
<SvgXml | ||
xml={Icons.ChevronRight} | ||
fill={Colors.neutral.shade75} | ||
width={Iconography.xxSmall} | ||
height={Iconography.xxSmall} | ||
/> | ||
</TouchableOpacity> | ||
) | ||
} | ||
|
||
const style = StyleSheet.create({ | ||
shareContainer: { | ||
...Affordances.floatingContainer, | ||
paddingVertical: Spacing.small, | ||
flexDirection: "row", | ||
alignItems: "center", | ||
borderColor: Colors.accent.danger100, | ||
borderWidth: Outlines.thin, | ||
backgroundColor: Colors.accent.danger25, | ||
}, | ||
imageContainer: { | ||
alignItems: "center", | ||
justifyContent: "center", | ||
}, | ||
image: { | ||
width: Iconography.large, | ||
height: Iconography.large, | ||
}, | ||
textContainer: { | ||
flex: 1, | ||
marginLeft: Spacing.medium, | ||
}, | ||
shareText: { | ||
...Typography.body.x30, | ||
...Typography.style.medium, | ||
color: Colors.text.primary, | ||
}, | ||
}) | ||
|
||
export default EnxMigrationInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.