Skip to content

Commit

Permalink
feat: only show setup link if wallet not connected (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericHgorski authored Jan 16, 2023
1 parent 47d83c1 commit 5f097df
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/app/sections/Links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import { ExternalLink } from "components/general"
import { Contacts } from "components/layout"
import styles from "./Links.module.scss"
import { capitalize } from "@mui/material"
import { WalletStatus, useWallet } from "@terra-money/use-wallet"

const Links = () => {
const { t } = useTranslation()
const { status } = useWallet()

const community = {
medium: "https://medium.com/terra-money",
Expand All @@ -21,10 +23,12 @@ const Links = () => {
return (
<div className={styles.links}>
<div className={styles.tutorial}>
<ExternalLink href={SETUP} className={styles.link}>
<BoltIcon style={{ fontSize: 18 }} />
{capitalize(t("setup"))}
</ExternalLink>
{status === WalletStatus.WALLET_NOT_CONNECTED && (
<ExternalLink href={SETUP} className={styles.link}>
<BoltIcon style={{ fontSize: 18 }} />
{capitalize(t("setup"))}
</ExternalLink>
)}
<ExternalLink href={DOCUMENTATION} className={styles.link}>
<DescriptionIcon style={{ fontSize: 18 }} />
{capitalize(t("documentation"))}
Expand Down

0 comments on commit 5f097df

Please sign in to comment.