Skip to content

Commit

Permalink
chore: change external links
Browse files Browse the repository at this point in the history
  • Loading branch information
msvstj committed Nov 8, 2023
1 parent f13a961 commit 6b53055
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .env.staging → .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ REACT_APP_MOONPAY_LINK="https://us-central1-uniswap-mobile.cloudfunctions.net/si
REACT_APP_MOONPAY_PUBLISHABLE_KEY="pk_test_DycfESRid31UaSxhI5yWKe1r5E5kKSz"
#REACT_APP_SENTRY_DSN="https://[email protected]/4504255148851200"
#REACT_APP_STATSIG_PROXY_URL="https://api.uniswap.org/v1/statsig-proxy"
REACT_APP_TEMP_API_URL = "https://temp-api.stg.swap.country" # routing-api v1
REACT_APP_UNISWAP_API_URL = "https://api.stg.swap.country" # routing-api-v2 (Unified Routing API)
REACT_APP_TEMP_API_URL = "https://temp-api.harmony.one" # routing-api v1
REACT_APP_UNISWAP_API_URL = "https://api.harmony.one" # routing-api-v2 (Unified Routing API)
REACT_APP_WALLET_CONNECT_PROJECT_ID="c6c9bacd35afa3eb9e6cccf6d8464395"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
.env

# generated contract types
/src/types/v3
Expand Down
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"background_color": "#fff",
"display": "standalone",
"homepage_url": "https://swap.country/",
"homepage_url": "https://swap.harmony.one/",
"providedBy": {
"name": "Swap",
"url": "https://swap.country/"
"url": "https://swap.harmony.one/"
},
"icons": [
{
Expand Down
36 changes: 13 additions & 23 deletions src/components/NavBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useIsNftPage } from 'hooks/useIsNftPage'
import { useIsPoolsPage } from 'hooks/useIsPoolsPage'
import { Box } from 'nft/components/Box'
import { Row } from 'nft/components/Flex'
import { UniIcon } from 'nft/components/icons'
import { useProfilePageState } from 'nft/hooks'
import { ProfilePageStateType } from 'nft/types'
import { ReactNode, useCallback } from 'react'
Expand All @@ -20,7 +19,6 @@ import { Bag } from './Bag'
import Blur from './Blur'
import { ChainSelector } from './ChainSelector'
import { MenuDropdown } from './MenuDropdown'
import { SearchBar } from './SearchBar'
import * as styles from './style.css'

const Nav = styled.nav`
Expand All @@ -34,7 +32,7 @@ interface MenuItemProps {
href: string
id?: NavLinkProps['id']
isActive?: boolean
external? : boolean
external?: boolean
children: ReactNode
dataTestId?: string
}
Expand All @@ -44,30 +42,22 @@ const MenuItem = ({ href, dataTestId, id, isActive, external, children }: MenuIt
className: isActive ? styles.activeMenuItem : styles.menuItem,
id,
style: { textDecoration: 'none' },
'data-testid': dataTestId
};
'data-testid': dataTestId,
}

if (external) {
return (
<a
{...linkProps}
href={href}
target="_blank"
rel="noopener noreferrer"
>
<a {...linkProps} href={href} target="_blank" rel="noopener noreferrer">
{children}
</a>
);
)
}

return (
<NavLink
{...linkProps}
to={href}
>
<NavLink {...linkProps} to={href}>
{children}
</NavLink>
);
)
}

export const PageTabs = () => {
Expand All @@ -85,7 +75,7 @@ export const PageTabs = () => {
<MenuItem href="/swap" isActive={pathname.startsWith('/swap')}>
<Trans>Swap</Trans>
</MenuItem>
{/* <MenuItem href={`/tokens/${chainName.toLowerCase()}`} isActive={pathname.startsWith('/tokens')}>
{/* <MenuItem href={`/tokens/${chainName.toLowerCase()}`} isActive={pathname.startsWith('/tokens')}>
<Trans>Tokens</Trans>
</MenuItem> */}
{!shouldDisableNFTRoutes && (
Expand All @@ -98,11 +88,11 @@ export const PageTabs = () => {
<Trans>Positions</Trans>
</MenuItem>
</Box>
<MenuItem href="https://info.swap.country/#/harmony/pools" external dataTestId="pool-nav-link">
<Trans>Pools</Trans>
<MenuItem href="https://info.harmony.one/#/harmony/pools" external dataTestId="pool-nav-link">
<Trans>Pools</Trans>
</MenuItem>
<MenuItem href="https://info.swap.country/#/harmony/tokens" external dataTestId="pool-nav-link">
<Trans>Tokens</Trans>
<MenuItem href="https://info.harmony.one/#/harmony/tokens" external dataTestId="pool-nav-link">
<Trans>Tokens</Trans>
</MenuItem>
<Box marginY={{ sm: '4', md: 'unset' }}>
<MenuDropdown />
Expand Down Expand Up @@ -141,7 +131,7 @@ const Navbar = ({ blur }: { blur: boolean }) => {
height="48"
data-testid="harmony-logo"
className={styles.logo}
src='/logo_fav.png'
src="/logo_fav.png"
onClick={() => {
navigate({
pathname: '/',
Expand Down
4 changes: 2 additions & 2 deletions src/components/PrivacyPolicy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function PrivacyPolicy() {
<AutoColumn gap="16px">
<AutoColumn gap="sm" style={{ width: '100%' }}>
<StyledExternalCard>
<ExternalLink href="https://doc.swap.country/terms-of-service-e096ae912a54464084a176f98127bf35">
<ExternalLink href="https://doc.swap.harmony.one/terms-of-service-e096ae912a54464084a176f98127bf35">
<RowBetween>
<AutoRow gap="4px">
<Info size={20} />
Expand All @@ -137,7 +137,7 @@ function PrivacyPolicy() {
</ExternalLink>
</StyledExternalCard>
<StyledExternalCard>
<ExternalLink href="https://doc.swap.country/privacy-policy-70fd833dc5f542a8b52ec73626ebb245">
<ExternalLink href="https://doc.swap.harmony.one/privacy-policy-70fd833dc5f542a8b52ec73626ebb245">
<RowBetween>
<AutoRow gap="4px">
<Info size={20} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/SwapCountryToSModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function SwapCountryToSModal() {
<Modal isOpen={isOpen} maxWidth={860}>
<Box display="flex" flexDirection="column" width="100%" style={{ padding: 15 }}>
<iframe
src="https://doc.swap.country/terms-of-service-e096ae912a54464084a176f98127bf35"
src="https://doc.swap.harmony.one/terms-of-service-e096ae912a54464084a176f98127bf35"
style={{ minHeight: '60vh', marginBottom: 20 }}
frameBorder={0}
width="100%"
Expand Down
4 changes: 2 additions & 2 deletions src/components/WalletModal/PrivacyPolicyNotice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export default function PrivacyPolicyNotice() {
return (
<ThemedText.Caption color="textSecondary">
<Trans>By connecting a wallet, you agree to </Trans>{' '}
<StyledLink href="https://doc.swap.country/terms-of-service-e096ae912a54464084a176f98127bf35">
<StyledLink href="https://doc.swap.harmony.one/terms-of-service-e096ae912a54464084a176f98127bf35">
<Trans>Terms of Service</Trans>{' '}
</StyledLink>
<Trans>and consent to its</Trans>{' '}
<StyledLink href="https://doc.swap.country/privacy-policy-70fd833dc5f542a8b52ec73626ebb245">
<StyledLink href="https://doc.swap.harmony.one/privacy-policy-70fd833dc5f542a8b52ec73626ebb245">
<Trans>Privacy Policy.</Trans>
</StyledLink>
<LastUpdatedText>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Pool/CTACards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function CTACards() {
</ThemedText.DeprecatedBody>
</ResponsiveColumn>
</CTA>
<CTA href="https://info.swap.country">
<CTA href="https://info.swap.harmony.one">
<ResponsiveColumn>
<HeaderText style={{ alignSelf: 'flex-start' }}>
<Trans>Top pools</Trans>
Expand Down
4 changes: 2 additions & 2 deletions src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ export function isAppUniswapOrg({ hostname }: { hostname: string }): boolean {
}

export function isSwapCountry({ hostname }: { hostname: string }): boolean {
return hostname === 'swap.country'
return hostname === 'swap.harmony.one'
}

export function isStgSwapCountry({ hostname }: { hostname: string }): boolean {
return hostname === 'stg.swap.country'
return hostname === 'stg.swap.harmony.one'
}

export function isAppUniswapStagingOrg({ hostname }: { hostname: string }): boolean {
Expand Down

0 comments on commit 6b53055

Please sign in to comment.