Skip to content

Commit

Permalink
Moved CMC attribution to navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarengathomas committed Mar 5, 2025
1 parent 5c470d1 commit 8bcfd23
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ExternalLink } from 'components/externalLink'
import { useTranslations } from 'next-intl'

const cssLink = 'text-orange-500 hover:text-orange-700'

export const CmcAttribution = function () {
const t = useTranslations('navbar')
return (
<p className="font-base mx-auto pt-4 text-center text-xs text-neutral-400 md:w-full md:text-left">
{t.rich('data-attribution', {
link: (chunk: string) => (
<ExternalLink className={cssLink} href="https://coinmarketcap.com/">
{chunk}
</ExternalLink>
),
})}
</p>
)
}
8 changes: 6 additions & 2 deletions webapp/app/[locale]/_components/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { HemiLogoFull } from './_components/hemiLogo'
import { ItemLink, ItemWithSubmenu, NetworkSwitch } from './_components/navItem'
import { SocialLinks } from './_components/socialLinks'
import { TermsAndConditions } from './_components/termsAndConditions'
import { CmcAttribution } from './_components/cmcAttribution'

Check warning on line 26 in webapp/app/[locale]/_components/navbar/index.tsx

View workflow job for this annotation

GitHub Actions / js-checks / run-checks

`./_components/cmcAttribution` import should occur before import of `./_components/getStarted`

Check warning on line 26 in webapp/app/[locale]/_components/navbar/index.tsx

View workflow job for this annotation

GitHub Actions / js-checks / run-checks

`./_components/cmcAttribution` import should occur before import of `./_components/getStarted`

const ActionableOperations = dynamic(
() =>
Expand Down Expand Up @@ -157,10 +158,13 @@ export const Navbar = function () {
<li className="order-16 md:order-14">
<SocialLinks />
</li>
<li className="order-16 md:hidden">
<li className="order-16 md:order-15">
<CmcAttribution />
</li>
<li className="order-17 md:order-16">
<Separator />
</li>
<li className="order-17 md:order-15">
<li className="order-18 md:order-17">
<TermsAndConditions />
</li>
</ul>
Expand Down
19 changes: 0 additions & 19 deletions webapp/app/[locale]/stake/_components/cmcAttribution.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions webapp/app/[locale]/stake/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import { PageTitle } from 'components/pageTitle'
import { useTranslations } from 'next-intl'

import { CmcAttribution } from '../_components/cmcAttribution'

import { StakeAssetsTable } from './_components/stakeAssetsTable'
import {
EarnedPoints,
Expand All @@ -29,9 +27,6 @@ const Page = function () {
<div className="mt-6 md:mt-8">
<StakeAssetsTable />
</div>
<div className="mt-6">
<CmcAttribution />
</div>
</div>
)
}
Expand Down
4 changes: 0 additions & 4 deletions webapp/app/[locale]/stake/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { useStakeTokens } from 'hooks/useStakeTokens'

import { CmcAttribution } from './_components/cmcAttribution'
import { StakeGraph } from './_components/icons/stakeGraph'
import { StakeAndEarn } from './_components/stakeAndEarn'
import { StakeStrategyTable } from './_components/stakeStrategyTable'
Expand Down Expand Up @@ -39,9 +38,6 @@ export default function Page() {
<PageBackground />
<div className="relative z-20 -translate-y-60 md:-translate-y-48">
<StakeStrategyTable data={stakeTokens} loading={false} />
<div className="mt-6">
<CmcAttribution />
</div>
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion webapp/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"connect-your-wallet": "Connect your Wallet",
"copied": "Copied",
"copy": "Copy",
"data-attribution": "Data provided by",
"erc20-approve-10x-deposits": "Approve 10x the amount of this deposit",
"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.",
"erc20-extra-approval": "Approve 10x deposits",
Expand Down Expand Up @@ -183,6 +182,7 @@
"navbar": {
"agree-to-terms-and-policy": "By using this application, you agree to the <terms>Terms of Use</terms> and <policy>Privacy Policy</policy>",
"bitcoinkit": "Hemi Bitcoin Kit",
"data-attribution": "Data provided by <link>CoinMarketCap.com</link>",
"demos": "Demos",
"explorer": "Explorer",
"get-started": "Get Started",
Expand Down
2 changes: 1 addition & 1 deletion webapp/messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"connect-your-wallet": "Conecte su Billetera",
"copied": "Copiado",
"copy": "Copiar",
"data-attribution": "Datos proporcionados por",
"erc20-approve-10x-deposits": "Aprobar 10x el monto de este depósito",
"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.",
"erc20-extra-approval": "Aprobar 10x este depósito",
Expand Down Expand Up @@ -183,6 +182,7 @@
"navbar": {
"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>",
"bitcoinkit": "Kit de Hemi Bitcoin",
"data-attribution": "Datos proporcionados por <link>CoinMarketCap.com</link>",
"demos": "Demos",
"explorer": "Explorador",
"get-started": "Comenzar",
Expand Down

0 comments on commit 8bcfd23

Please sign in to comment.