From 01c700bd7fc46e9d67c100b0440bdd458ef28143 Mon Sep 17 00:00:00 2001 From: n0izn0iz Date: Mon, 15 Jan 2024 22:46:50 +0100 Subject: [PATCH] feat: add explorer link on UPP (#865) Signed-off-by: Norman Meier --- assets/icons/info_black.svg | 5 +++++ .../screens/UserPublicProfile/components/UPPIntro.tsx | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 assets/icons/info_black.svg diff --git a/assets/icons/info_black.svg b/assets/icons/info_black.svg new file mode 100644 index 0000000000..ce36aff2ec --- /dev/null +++ b/assets/icons/info_black.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/screens/UserPublicProfile/components/UPPIntro.tsx b/packages/screens/UserPublicProfile/components/UPPIntro.tsx index 36900cce0e..9f943c58eb 100644 --- a/packages/screens/UserPublicProfile/components/UPPIntro.tsx +++ b/packages/screens/UserPublicProfile/components/UPPIntro.tsx @@ -3,6 +3,7 @@ import { Linking, useWindowDimensions, View } from "react-native"; import defaultUserProfileBannerPNG from "../../../../assets/default-images/default-user-profile-banner.png"; import discordSVG from "../../../../assets/icons/discord.svg"; +import infoSVG from "../../../../assets/icons/info_black.svg"; import shareSVG from "../../../../assets/icons/share.svg"; import twitterSVG from "../../../../assets/icons/twitter.svg"; import websiteSVG from "../../../../assets/icons/website.svg"; @@ -18,7 +19,7 @@ import { ProfileButton } from "../../../components/hub/ProfileButton"; import { UserAvatarWithFrame } from "../../../components/images/AvatarWithFrame"; import { useMaxResolution } from "../../../hooks/useMaxResolution"; import { useNSUserInfo } from "../../../hooks/useNSUserInfo"; -import { parseUserId } from "../../../networks"; +import { accountExplorerLink, parseUserId } from "../../../networks"; import { DEFAULT_NAME } from "../../../utils/social-feed"; import { neutral00, neutral55, neutral77 } from "../../../utils/style/colors"; import { @@ -98,6 +99,14 @@ export const UPPIntro: React.FC<{ onPress={() => Linking.openURL(metadata.twitter_id || "")} /> )} + + Linking.openURL(accountExplorerLink(network?.id, userAddress)) + } + /> {/* This Share button link works only on web */}