Skip to content

Commit 971d331

Browse files
committed
Merge branch 'dev' into updateGrants
2 parents 31cdfbf + ab31268 commit 971d331

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+350
-220
lines changed

app/[locale]/[...slug]/page.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import mdComponents from "@/components/MdComponents"
77

88
import { dataLoader } from "@/lib/utils/data/dataLoader"
99
import { dateToString } from "@/lib/utils/date"
10+
import { getLayoutFromSlug } from "@/lib/utils/layout"
1011
import { getPostSlugs } from "@/lib/utils/md"
1112
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1213

@@ -19,18 +20,6 @@ import { getMdMetadata } from "@/lib/md/metadata"
1920

2021
const loadData = dataLoader([["gfissues", fetchGFIs]])
2122

22-
function getLayoutFromSlug(slug: string) {
23-
if (slug.includes("developers/docs")) {
24-
return "docs"
25-
}
26-
27-
if (slug.includes("developers/tutorials")) {
28-
return "tutorial"
29-
}
30-
31-
return "static"
32-
}
33-
3423
export default async function Page({
3524
params,
3625
}: {
@@ -69,7 +58,8 @@ export default async function Page({
6958
slug,
7059
// TODO: Address component typing error here (flip `FC` types to prop object types)
7160
// @ts-expect-error Incompatible component function signatures
72-
components: { ...mdComponents, ...componentsMapping },
61+
baseComponents: mdComponents,
62+
componentsMapping,
7363
scope: {
7464
gfissues,
7565
},

app/[locale]/_components/home.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,8 @@ const HomePage = ({
651651
e.currentTarget.onerror = null
652652
e.currentTarget.src = EventFallback.src
653653
}}
654+
referrerPolicy="no-referrer"
655+
crossOrigin="anonymous"
654656
/>
655657
</CardBanner>
656658
<CardContent>
@@ -738,6 +740,8 @@ const HomePage = ({
738740
}}
739741
className="max-w-full object-cover object-center"
740742
loading="lazy"
743+
referrerPolicy="no-referrer"
744+
crossOrigin="anonymous"
741745
/>
742746
) : (
743747
<Image src={EventFallback} alt="" />

app/[locale]/dapps/_components/dapps.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ const DappsPage = ({
542542
{
543543
title: "Curve",
544544
description: t("page-dapps-dapp-description-curve"),
545-
link: "https://curve.fi/",
545+
link: "https://www.curve.finance/",
546546
image: curve,
547547
alt: t("page-dapps-curve-logo-alt"),
548548
},
@@ -1111,7 +1111,7 @@ const DappsPage = ({
11111111
<H2 id="explore">{t("page-dapps-explore-dapps-title")}</H2>
11121112
<CenterText>{t("page-dapps-explore-dapps-description")}</CenterText>
11131113
<H3>{t("page-dapps-choose-category")}</H3>
1114-
<div className="mb-8 grid w-full grid-cols-1 justify-center gap-4 px-8 sm:grid-cols-2 lg:w-auto lg:grid-cols-3 2xl:grid-cols-6">
1114+
<div className="mb-8 grid w-full grid-cols-1 justify-center gap-4 px-8 sm:grid-cols-2 lg:w-auto lg:grid-cols-[repeat(4,auto)]">
11151115
{categoryKeys.map((key, idx) => {
11161116
const categoryType = key as CategoryType
11171117
const category = categories[categoryType]

app/[locale]/page.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { dataLoader } from "@/lib/utils/data/dataLoader"
1313
import { isValidDate } from "@/lib/utils/date"
1414
import { existsNamespace } from "@/lib/utils/existsNamespace"
1515
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
16+
import { getMetadata } from "@/lib/utils/metadata"
1617
import { polishRSSList } from "@/lib/utils/rss"
1718
import { getLocaleTimestamp } from "@/lib/utils/time"
1819
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
@@ -127,13 +128,21 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
127128
)
128129
}
129130

130-
export async function generateMetadata() {
131-
const t = await getTranslations()
131+
export async function generateMetadata({
132+
params,
133+
}: {
134+
params: Promise<{ locale: string }>
135+
}) {
136+
const { locale } = await params
132137

133-
return {
134-
title: t("page-index.page-index-meta-title"),
135-
description: t("page-index.page-index-meta-description"),
136-
}
138+
const t = await getTranslations({ locale, namespace: "page-index" })
139+
140+
return await getMetadata({
141+
locale,
142+
slug: [""],
143+
title: t("page-index-meta-title"),
144+
description: t("page-index-meta-description"),
145+
})
137146
}
138147

139148
export default Page

app/[locale]/resources/_components/resources.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,12 @@ const ResourcesPage = ({ txCostsMedianUsd }: ResourcesPageProps) => {
125125
<div className="h-full bg-background bg-gradient-to-br from-white to-primary/10 px-2 py-6 dark:from-transparent dark:to-primary/10">
126126
{metric && metric}
127127
<ResourcesContainer>
128-
{items.map((item) => (
129-
<ResourceItem item={item} key={item.title} />
128+
{items.map(({ className, ...item }) => (
129+
<ResourceItem
130+
item={item}
131+
key={item.title}
132+
className={className}
133+
/>
130134
))}
131135
</ResourcesContainer>
132136
</div>

app/[locale]/wallets/find-wallet/_components/find-wallet.tsx

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,12 @@
22

33
import type { ChildOnlyProp, Wallet } from "@/lib/types"
44

5-
import BannerNotification from "@/components/Banners/BannerNotification"
65
import Breadcrumbs from "@/components/Breadcrumbs"
76
import FindWalletProductTable from "@/components/FindWalletProductTable"
8-
import { Image } from "@/components/Image"
97
import MainArticle from "@/components/MainArticle"
10-
import InlineLink from "@/components/ui/Link"
11-
12-
import { cn } from "@/lib/utils/cn"
138

149
import { useTranslation } from "@/hooks/useTranslation"
1510
import { usePathname } from "@/i18n/routing"
16-
import HeroImage from "@/public/images/wallets/wallet-hero.png"
1711

1812
const Subtitle = ({ children }: ChildOnlyProp) => (
1913
<p className="mb-6 text-xl leading-[1.4] text-body-medium last:mb-8">
@@ -31,41 +25,12 @@ const FindWalletPage = ({ wallets }: Props) => {
3125

3226
return (
3327
<MainArticle className="relative flex flex-col">
34-
<BannerNotification shouldShow={true}>
35-
{t("page-find-wallet-footnote-1")}
36-
</BannerNotification>
37-
38-
<div
39-
className={cn(
40-
"relative mb-[44px] flex w-full flex-col p-12 md:flex-row",
41-
"bg-gradient-to-r from-accent-a/10 to-accent-c/10 dark:from-accent-a/20 dark:to-accent-c-hover/20"
42-
)}
43-
>
44-
<div className="mt-8 w-full sm:mt-0 md:w-1/2">
45-
<Breadcrumbs slug={pathname} />
46-
<h1 className="mb-8 mt-8 text-[2.5rem] leading-[1.4] md:text-5xl">
47-
{t("page-find-wallet-title")}
48-
</h1>
49-
<Subtitle>{t("page-find-wallet-description")}</Subtitle>
50-
<Subtitle>
51-
{t("page-find-wallet-desc-2")}{" "}
52-
<InlineLink href="/wallets">
53-
{t("page-find-wallet-desc-2-wallets-link")}
54-
</InlineLink>
55-
</Subtitle>
56-
</div>
57-
<div className="flex w-full items-center justify-center md:w-1/2">
58-
<Image
59-
src={HeroImage}
60-
// TODO: adjust value when the old theme breakpoints are removed (src/theme.ts)
61-
sizes="(max-width: 480px) 100vw, 500px"
62-
alt=""
63-
priority
64-
style={{
65-
objectFit: "contain",
66-
}}
67-
/>
68-
</div>
28+
<div className="flex w-full flex-col gap-8 px-4 pb-4 pt-11 md:w-1/2">
29+
<Breadcrumbs slug={pathname} />
30+
<h1 className="text-[2.5rem] leading-[1.4] md:text-5xl">
31+
{t("page-find-wallet-title")}
32+
</h1>
33+
<Subtitle>{t("page-find-wallet-description")}</Subtitle>
6934
</div>
7035

7136
<FindWalletProductTable wallets={wallets} />

0 commit comments

Comments
 (0)