Skip to content

Commit 8bcfd23

Browse files
author
Thomas Alvarenga
committed
Moved CMC attribution to navbar
1 parent 5c470d1 commit 8bcfd23

File tree

7 files changed

+27
-32
lines changed

7 files changed

+27
-32
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { ExternalLink } from 'components/externalLink'
2+
import { useTranslations } from 'next-intl'
3+
4+
const cssLink = 'text-orange-500 hover:text-orange-700'
5+
6+
export const CmcAttribution = function () {
7+
const t = useTranslations('navbar')
8+
return (
9+
<p className="font-base mx-auto pt-4 text-center text-xs text-neutral-400 md:w-full md:text-left">
10+
{t.rich('data-attribution', {
11+
link: (chunk: string) => (
12+
<ExternalLink className={cssLink} href="https://coinmarketcap.com/">
13+
{chunk}
14+
</ExternalLink>
15+
),
16+
})}
17+
</p>
18+
)
19+
}

webapp/app/[locale]/_components/navbar/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { HemiLogoFull } from './_components/hemiLogo'
2323
import { ItemLink, ItemWithSubmenu, NetworkSwitch } from './_components/navItem'
2424
import { SocialLinks } from './_components/socialLinks'
2525
import { TermsAndConditions } from './_components/termsAndConditions'
26+
import { CmcAttribution } from './_components/cmcAttribution'
2627

2728
const ActionableOperations = dynamic(
2829
() =>
@@ -157,10 +158,13 @@ export const Navbar = function () {
157158
<li className="order-16 md:order-14">
158159
<SocialLinks />
159160
</li>
160-
<li className="order-16 md:hidden">
161+
<li className="order-16 md:order-15">
162+
<CmcAttribution />
163+
</li>
164+
<li className="order-17 md:order-16">
161165
<Separator />
162166
</li>
163-
<li className="order-17 md:order-15">
167+
<li className="order-18 md:order-17">
164168
<TermsAndConditions />
165169
</li>
166170
</ul>

webapp/app/[locale]/stake/_components/cmcAttribution.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.

webapp/app/[locale]/stake/dashboard/page.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import { PageTitle } from 'components/pageTitle'
44
import { useTranslations } from 'next-intl'
55

6-
import { CmcAttribution } from '../_components/cmcAttribution'
7-
86
import { StakeAssetsTable } from './_components/stakeAssetsTable'
97
import {
108
EarnedPoints,
@@ -29,9 +27,6 @@ const Page = function () {
2927
<div className="mt-6 md:mt-8">
3028
<StakeAssetsTable />
3129
</div>
32-
<div className="mt-6">
33-
<CmcAttribution />
34-
</div>
3530
</div>
3631
)
3732
}

webapp/app/[locale]/stake/page.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { useStakeTokens } from 'hooks/useStakeTokens'
44

5-
import { CmcAttribution } from './_components/cmcAttribution'
65
import { StakeGraph } from './_components/icons/stakeGraph'
76
import { StakeAndEarn } from './_components/stakeAndEarn'
87
import { StakeStrategyTable } from './_components/stakeStrategyTable'
@@ -39,9 +38,6 @@ export default function Page() {
3938
<PageBackground />
4039
<div className="relative z-20 -translate-y-60 md:-translate-y-48">
4140
<StakeStrategyTable data={stakeTokens} loading={false} />
42-
<div className="mt-6">
43-
<CmcAttribution />
44-
</div>
4541
</div>
4642
</div>
4743
)

webapp/messages/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"connect-your-wallet": "Connect your Wallet",
1414
"copied": "Copied",
1515
"copy": "Copy",
16-
"data-attribution": "Data provided by",
1716
"erc20-approve-10x-deposits": "Approve 10x the amount of this deposit",
1817
"erc20-approve-10x-detailed-description": "By activating 10x approval we automatically add 10x the amount of this transaction as allowance for future ones, saving you money on gas fees and time.",
1918
"erc20-extra-approval": "Approve 10x deposits",
@@ -183,6 +182,7 @@
183182
"navbar": {
184183
"agree-to-terms-and-policy": "By using this application, you agree to the <terms>Terms of Use</terms> and <policy>Privacy Policy</policy>",
185184
"bitcoinkit": "Hemi Bitcoin Kit",
185+
"data-attribution": "Data provided by <link>CoinMarketCap.com</link>",
186186
"demos": "Demos",
187187
"explorer": "Explorer",
188188
"get-started": "Get Started",

webapp/messages/es.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"connect-your-wallet": "Conecte su Billetera",
1414
"copied": "Copiado",
1515
"copy": "Copiar",
16-
"data-attribution": "Datos proporcionados por",
1716
"erc20-approve-10x-deposits": "Aprobar 10x el monto de este depósito",
1817
"erc20-approve-10x-detailed-description": "Al activar la aprobación 10x, automáticamente agregamos 10 veces el monto de esta transacción como monto autorizado para otras futuras, lo que le permite ahorrar dinero en tarifas de gas y tiempo.",
1918
"erc20-extra-approval": "Aprobar 10x este depósito",
@@ -183,6 +182,7 @@
183182
"navbar": {
184183
"agree-to-terms-and-policy": "Al usar esta aplicación, usted acepta los <terms>Términos de Uso</terms> y la <policy>Política de Privacidad</policy>",
185184
"bitcoinkit": "Kit de Hemi Bitcoin",
185+
"data-attribution": "Datos proporcionados por <link>CoinMarketCap.com</link>",
186186
"demos": "Demos",
187187
"explorer": "Explorador",
188188
"get-started": "Comenzar",

0 commit comments

Comments
 (0)