Skip to content

Commit

Permalink
feat: add explorer link on UPP (#865)
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Meier <[email protected]>
  • Loading branch information
n0izn0iz authored and ChiragPansuriya-iView committed Jan 31, 2024
1 parent 9c8224f commit 01c700b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions assets/icons/info_black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion packages/screens/UserPublicProfile/components/UPPIntro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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 {
Expand Down Expand Up @@ -98,6 +99,14 @@ export const UPPIntro: React.FC<{
onPress={() => Linking.openURL(metadata.twitter_id || "")}
/>
)}
<SocialButtonSecondary
iconSvg={infoSVG}
text="Explorer"
style={socialButtonStyle}
onPress={() =>
Linking.openURL(accountExplorerLink(network?.id, userAddress))
}
/>
{/* This Share button link works only on web */}
<SocialButtonSecondary
style={socialButtonStyle}
Expand Down

0 comments on commit 01c700b

Please sign in to comment.