Skip to content

Commit 6853987

Browse files
Merge branch 'staging' into refactor/refine-dashboard-page-design
2 parents ae0d083 + 70a1ea4 commit 6853987

File tree

131 files changed

+3232
-748
lines changed

Some content is hidden

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

131 files changed

+3232
-748
lines changed

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

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

88
import { dataLoader } from "@/lib/utils/data/dataLoader"
9+
import { dateToString } from "@/lib/utils/date"
910
import { getPostSlugs } from "@/lib/utils/md"
1011
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1112

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

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

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+
2134
export default async function Page({
2235
params,
2336
}: {
@@ -49,6 +62,7 @@ export default async function Page({
4962
tocItems,
5063
lastEditLocaleTimestamp,
5164
isTranslated,
65+
contributors,
5266
} = await getPageData({
5367
locale,
5468
slug,
@@ -61,9 +75,14 @@ export default async function Page({
6175
})
6276

6377
// Determine the actual layout after we have the frontmatter
64-
const layout = frontmatter.template || "static"
78+
const layout = frontmatter.template || getLayoutFromSlug(slug)
6579
const Layout = layoutMapping[layout]
6680

81+
// If the page has a published date, format it
82+
if ("published" in frontmatter) {
83+
frontmatter.published = dateToString(frontmatter.published)
84+
}
85+
6786
// Get i18n messages
6887
const allMessages = await getMessages({ locale })
6988
const requiredNamespaces = getRequiredNamespacesForPage(slug, layout)
@@ -77,6 +96,9 @@ export default async function Page({
7796
tocItems={tocItems}
7897
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
7998
contentNotTranslated={!isTranslated}
99+
contributors={contributors}
100+
// TODO: Remove this once we have a real timeToRead value
101+
timeToRead={2}
80102
>
81103
{content}
82104
</Layout>
@@ -85,7 +107,7 @@ export default async function Page({
85107
}
86108

87109
export async function generateStaticParams() {
88-
const slugs = await getPostSlugs("/", /\/developers/)
110+
const slugs = await getPostSlugs("/")
89111

90112
return LOCALES_CODES.flatMap((locale) =>
91113
slugs.map((slug) => ({
@@ -95,6 +117,8 @@ export async function generateStaticParams() {
95117
)
96118
}
97119

120+
export const dynamicParams = false
121+
98122
export async function generateMetadata({
99123
params,
100124
}: {

app/[locale]/developers/docs/[[...doc]]/page.tsx

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

app/[locale]/developers/tutorials/[...tutorial]/page.tsx

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

docs/applying-storybook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,4 +229,4 @@ parameters: {
229229
}
230230
```
231231

232-
> 🚨 NOTE: This will be notated ahead of time by the team which stories should not receive snapshots.
232+
> 🚨 NOTE: This will be noted ahead of time by the team which stories should not receive snapshots.

docs/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ How to prepare your content for translation depends on whether you're working on
88

99
**- MDX pages (`public/content/page/`)**
1010

11-
Markdown will be translated as whole pages of content, so no specific action is required. Simply create a new folder within `public/content/` with the name of the page, then place index markdown file (ie. `index.md`) within the new folder.
11+
Markdown will be translated as whole pages of content, so no specific action is required. Simply create a new folder within `public/content/` with the name of the page, then place an index markdown file (ie. `index.md`) within the new folder.
1212

1313
**- React component page**
1414

docs/header-ids.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ See a live example on ethereum.org: [https://ethereum.org/en/developers/docs/blo
3636

3737
### English content
3838

39-
These should be created for header on every new English markdown document.
39+
These should be created for header in every new English markdown document.
4040

4141
### Translated content
4242

docs/translation-program.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
_The Translation Program is an initiative to translate ethereum.org into different languages and make the website accessible to people from all over the world._
44

5-
If you are looking to get involved as a translator, you can [join our project in Crowdin](https://crowdin.com/project/ethereum-org/) and start translating the website to your language immediately.
5+
If you are looking to get involved as a translator, you can [join our project in Crowdin](https://crowdin.com/project/ethereum-org/) and start translating the website into your language immediately.
66

77
To get more information about the program, learn how to use Crowdin, check on the progress or find some useful tools for translators, please visit the [Translation Program page](https://ethereum.org/en/contributing/translation-program/).

next.config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ module.exports = (phase, { defaultConfig }) => {
8181
protocol: "https",
8282
hostname: "crowdin-static.downloads.crowdin.com",
8383
},
84+
{
85+
protocol: "https",
86+
hostname: "avatars.githubusercontent.com",
87+
},
88+
{
89+
protocol: "https",
90+
hostname: "coin-images.coingecko.com",
91+
},
8492
],
8593
},
8694
async headers() {
@@ -116,7 +124,6 @@ module.exports = (phase, { defaultConfig }) => {
116124
"node_modules/@swc/core-linux-x64-musl",
117125
"node_modules/@esbuild/linux-x64",
118126
"src/data",
119-
"src/intl",
120127
"public/**/*.jpg",
121128
"public/**/*.png",
122129
"public/**/*.webp",

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-org-website",
3-
"version": "9.7.0",
3+
"version": "10.0.0",
44
"license": "MIT",
55
"private": true,
66
"scripts": {
@@ -47,7 +47,9 @@
4747
"@radix-ui/react-tabs": "^1.1.0",
4848
"@radix-ui/react-tooltip": "^1.1.2",
4949
"@radix-ui/react-visually-hidden": "^1.1.0",
50+
"@rainbow-me/rainbowkit": "^2.2.3",
5051
"@socialgouv/matomo-next": "^1.8.0",
52+
"@tanstack/react-query": "^5.66.7",
5153
"@tanstack/react-table": "^8.19.3",
5254
"chart.js": "^4.4.2",
5355
"chartjs-plugin-datalabels": "^2.2.0",
@@ -62,7 +64,7 @@
6264
"lodash.merge": "^4.6.2",
6365
"lodash.shuffle": "^4.2.0",
6466
"lodash.union": "^4.6.0",
65-
"next": "^14.2.21",
67+
"next": "^14.2.25",
6668
"next-intl": "^3.26.3",
6769
"next-mdx-remote": "^5.0.0",
6870
"next-sitemap": "^4.2.3",
@@ -86,6 +88,8 @@
8688
"tailwindcss-animate": "^1.0.7",
8789
"usehooks-ts": "^3.1.0",
8890
"vaul": "^1.0.0",
91+
"viem": "^2.23.3",
92+
"wagmi": "^2.14.11",
8993
"yaml-loader": "^0.8.0"
9094
},
9195
"devDependencies": {

0 commit comments

Comments
 (0)