Skip to content

Commit 06cca57

Browse files
committed
Merge branch 'dev' into feedback-widget
2 parents 7f3212c + 32b00b3 commit 06cca57

File tree

196 files changed

+8572
-3970
lines changed

Some content is hidden

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

196 files changed

+8572
-3970
lines changed

.env.example

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
# rename this file to .env and supply the values listed below
22
# also make sure they are available to the build tool (e.g. Netlify)
3-
# warning: variables prefixed with GATSBY_ will be made available to client-side code
3+
# warning: variables prefixed with NEXT_PUBLIC_ will be made available to client-side code
44
# be careful not to expose sensitive data (e.g. your Algolia admin key)
5-
# ALGOLIA_ADMIN_KEY=insertValue
5+
6+
# Algolia environment (app ID, search key and base search index name required for search)
7+
# NEXT_PUBLIC_ALGOLIA_APP_ID=insertValue
8+
# NEXT_PUBLIC_ALGOLIA_SEARCH_KEY=insertValue
9+
# NEXT_PUBLIC_ALGOLIA_BASE_SEARCH_INDEX_NAME=insertValue
10+
# NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY=insertValue
11+
12+
# Etherscan API key (required for Etherscan API fetches)
613
# ETHERSCAN_API_KEY=insertValue
7-
# GATSBY_ALGOLIA_APP_ID=insertValue
8-
# GATSBY_ALGOLIA_SEARCH_KEY=insertValue
9-
# GATSBY_ALGOLIA_BASE_SEARCH_INDEX_NAME=insertValue
10-
NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY=insertValue
11-
# GATSBY_FUNCTIONS_PATH=insertValue
1214

13-
# Folders or files to ignore from the `public/content` folder
14-
IGNORE_CONTENT=**/docs,**/tutorials
15+
# Google API key and Calendar ID (required to fetch Calendar events)
16+
# GOOGLE_API_KEY=
17+
# GOOGLE_CALENDAR_ID=
18+
19+
# Matomo environment (URL and site ID required for analytics)
20+
NEXT_PUBLIC_MATOMO_URL=
21+
NEXT_PUBLIC_MATOMO_SITE_ID=
1522

1623
# Used to avoid loading Matomo in our preview deploys
1724
IS_PREVIEW_DEPLOY=false
@@ -21,6 +28,6 @@ IS_PREVIEW_DEPLOY=false
2128
# Note: always include `en` as it is the default lang of the site
2229
BUILD_LOCALES=
2330

24-
# If resource constraints are being hit during builds, change LIMIT_CPU to `true`
25-
# to limit the demand during build time
26-
LIMIT_CPU=false
31+
# If resource constraints are being hit during builds, change LIMIT_CPUS to a
32+
# fixed number of CPUs (e.g. 2) to limit the demand during build time
33+
LIMIT_CPUS=

.github/workflows/chromatic.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# .github/workflows/chromatic.yml
2+
3+
# Workflow name
4+
name: Chromatic Publish and Testing
5+
6+
# Event for the workflow
7+
on:
8+
pull_request:
9+
types:
10+
- opened
11+
- synchronize
12+
- ready_for_review
13+
paths:
14+
# Only run on file changes in any of these paths
15+
- "src/components/**/*"
16+
- "src/pages/**/*"
17+
- "src/layouts/**/*"
18+
- "src/@chakra-ui/**/*"
19+
20+
# List of jobs
21+
jobs:
22+
chromatic-deployment:
23+
# Operating System
24+
runs-on: ubuntu-latest
25+
# Job steps
26+
steps:
27+
# 👇 Version 2 of the action
28+
- name: Checkout repo
29+
uses: actions/checkout@v2
30+
with:
31+
fetch-depth: 0 # 👈 Required to retrieve git history
32+
- name: Install deps
33+
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
34+
run: yarn
35+
- name: Publish to Chromatic
36+
# 👇 Adds Chromatic as a step in the workflow
37+
uses: chromaui/action@v1
38+
# Options required for Chromatic's GitHub Action
39+
with:
40+
projectToken: fee8e66c9916
41+
# 👇 Only fail if Storybook contains stories that error
42+
exitZeroOnChanges: true

.storybook/main.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,14 @@ import { propNames } from "@chakra-ui/react"
1515
* The primary recommendation is to upgrade to Yarn 3 if possible
1616
*/
1717

18-
/**
19-
* Temporary list of allowed stories during migration to NextJS
20-
*/
21-
const tempStoryList = ["../src/components/Buttons/**/*.stories.@(ts|tsx)"]
22-
2318
const config: StorybookConfig = {
24-
stories: tempStoryList,
19+
stories: ["../src/components/**/*.stories.{ts,tsx}"],
2520
addons: [
2621
"@storybook/addon-links",
2722
"@storybook/addon-essentials",
28-
"@storybook/addon-onboarding",
2923
"@storybook/addon-interactions",
3024
"@chakra-ui/storybook-addon",
31-
"storybook-react-i18next"
25+
"storybook-react-i18next",
3226
],
3327
staticDirs: ["../public"],
3428
framework: {

netlify.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
[functions]
2121
included_files = [
22-
"!./src/data/**/*",
22+
"./src/intl/**/*",
2323
"!./public/**/*",
24-
24+
"!./node_modules/@swc/core-linux-x64-musl/**/*",
2525
]

next.config.js

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ const { PHASE_DEVELOPMENT_SERVER } = require("next/constants")
22

33
const { i18n } = require("./next-i18next.config")
44

5-
const experimental =
6-
(process.env.LIMIT_CPU || "").toLowerCase() === "true"
7-
? {
8-
// This option could be enabled in the future when flagged as stable, to speed up builds
9-
// (see https://nextjs.org/docs/pages/building-your-application/configuring/mdx#using-the-rust-based-mdx-compiler-experimental)
10-
// mdxRs: true,
11-
12-
// Reduce the number of cpus and disable parallel threads in prod envs to consume less memory
13-
workerThreads: false,
14-
cpus: 2,
15-
}
16-
: {}
5+
const LIMIT_CPUS = Number(process.env.LIMIT_CPUS || 2)
6+
7+
const experimental = LIMIT_CPUS
8+
? {
9+
// This option could be enabled in the future when flagged as stable, to speed up builds
10+
// (see https://nextjs.org/docs/pages/building-your-application/configuring/mdx#using-the-rust-based-mdx-compiler-experimental)
11+
// mdxRs: true,
12+
13+
// Reduce the number of cpus and disable parallel threads in prod envs to consume less memory
14+
workerThreads: false,
15+
cpus: LIMIT_CPUS,
16+
}
17+
: {}
1718

1819
/** @type {import('next').NextConfig} */
1920
module.exports = (phase, { defaultConfig }) => {
@@ -29,19 +30,13 @@ module.exports = (phase, { defaultConfig }) => {
2930
test: /\.svg$/,
3031
use: "@svgr/webpack",
3132
})
32-
config.module.rules.push({
33-
test: /\.mp4$/,
34-
use: {
35-
loader: 'file-loader',
36-
options: {
37-
name: '[name].[ext]',
38-
},
39-
},
40-
});
4133

4234
return config
4335
},
4436
i18n,
37+
images: {
38+
deviceSizes: [640, 750, 828, 1080, 1200, 1504, 1920],
39+
},
4540
}
4641

4742
if (phase !== PHASE_DEVELOPMENT_SERVER) {

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
"@docsearch/react": "^3.5.2",
2222
"@emotion/react": "^11.11.1",
2323
"@emotion/styled": "^11.11.0",
24+
"@socialgouv/matomo-next": "^1.8.0",
2425
"clipboard": "^2.0.11",
26+
"embla-carousel-react": "^7.0.0",
2527
"ethereum-blockies-base64": "^1.0.2",
26-
"file-loader": "^6.2.0",
2728
"focus-trap-react": "^10.2.3",
2829
"framer-motion": "^10.13.0",
2930
"gray-matter": "^4.0.3",
@@ -32,7 +33,7 @@
3233
"lodash.merge": "^4.6.2",
3334
"lodash.shuffle": "^4.2.0",
3435
"luxon": "^3.4.3",
35-
"next": "^14.0.0",
36+
"next": "13.4.8",
3637
"next-i18next": "^14.0.3",
3738
"next-mdx-remote": "^3.0.8",
3839
"next-sitemap": "^4.2.3",
@@ -44,21 +45,20 @@
4445
"react-i18next": "^13.3.1",
4546
"react-icons": "^4.10.1",
4647
"react-lite-youtube-embed": "^2.4.0",
47-
"react-select": "^5.7.7",
48+
"react-select": "^4.3.0",
4849
"reading-time": "^1.5.0",
4950
"recharts": "^2.7.3",
5051
"remark-gfm": "^3.0.1",
5152
"yaml-loader": "^0.8.0"
5253
},
5354
"devDependencies": {
5455
"@chakra-ui/storybook-addon": "5.1.0",
55-
"@netlify/plugin-nextjs": "^4.40.2",
56-
"@storybook/addon-essentials": "7.5.3",
57-
"@storybook/addon-interactions": "7.5.3",
58-
"@storybook/addon-links": "7.5.3",
59-
"@storybook/addon-onboarding": "1.0.8",
60-
"@storybook/nextjs": "7.5.3",
61-
"@storybook/react": "7.5.3",
56+
"@netlify/plugin-nextjs": "^4.41.3",
57+
"@storybook/addon-essentials": "7.6.6",
58+
"@storybook/addon-interactions": "7.6.6",
59+
"@storybook/addon-links": "7.6.6",
60+
"@storybook/nextjs": "7.6.6",
61+
"@storybook/react": "7.6.6",
6262
"@storybook/testing-library": "0.2.2",
6363
"@svgr/webpack": "^8.1.0",
6464
"@types/hast": "^3.0.0",
@@ -67,7 +67,7 @@
6767
"@types/react": "^18.2.15",
6868
"@types/react-dom": "^18.2.7",
6969
"eslint": "^8.45.0",
70-
"eslint-config-next": "^14.0.0",
70+
"eslint-config-next": "^13.0.0",
7171
"eslint-config-prettier": "^9.0.0",
7272
"eslint-plugin-simple-import-sort": "^10.0.0",
7373
"eslint-plugin-storybook": "^0.6.15",
@@ -76,7 +76,7 @@
7676
"minimist": "^1.2.8",
7777
"polished": "^4.2.2",
7878
"raw-loader": "^4.0.2",
79-
"storybook": "7.5.3",
79+
"storybook": "7.6.6",
8080
"storybook-react-i18next": "^2.0.9",
8181
"ts-node": "^10.9.1",
8282
"typescript": "^5.1.6",

public/_redirects

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/en/ / 301!
2+
13
/discord https://discord.gg/ethereum-org 301!
24

35
/*/discord https://discord.gg/ethereum-org 301!

public/dapps/ens.png

9.46 KB
Loading

public/heroes/garden.jpg

842 KB
Loading

public/heroes/guides-hub-hero.jpg

847 KB
Loading

0 commit comments

Comments
 (0)