Skip to content

Commit 9ec83f0

Browse files
authored
Merge pull request #15296 from ethereum/error-page
Update error page content and structure
2 parents 9e66fd8 + 3c234ae commit 9ec83f0

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

app/[locale]/error.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,9 @@ import { useEffect } from "react"
44

55
import MainArticle from "@/components/MainArticle"
66
import Translation from "@/components/Translation"
7-
import { Button } from "@/components/ui/buttons/Button"
7+
import { BaseLink } from "@/components/ui/Link"
88

9-
export default function Error({
10-
error,
11-
reset,
12-
}: {
13-
error: Error
14-
reset: () => void
15-
}) {
9+
export default function Error({ error }: { error: Error; reset: () => void }) {
1610
useEffect(() => {
1711
// TODO: log the error to an error reporting service
1812
console.error(error)
@@ -22,10 +16,16 @@ export default function Error({
2216
<div className="mx-auto mb-0 mt-16 flex w-full flex-col items-center">
2317
<MainArticle className="my-8 w-full space-y-8 px-8 py-4">
2418
<h1>
25-
<Translation id="we-couldnt-find-that-page" />
19+
<Translation id="error-page-title" />
2620
</h1>
27-
<p>Something went wrong.</p>
28-
<Button onClick={() => reset()}>Try again</Button>
21+
<p className="mb-4">
22+
<Translation id="error-page-description" />
23+
</p>
24+
<p>
25+
<BaseLink href="/">
26+
<Translation id="error-page-home-link" />
27+
</BaseLink>
28+
</p>
2929
</MainArticle>
3030
</div>
3131
)

src/intl/en/common.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,9 @@
437437
"verkle-trees": "Verkle trees",
438438
"wallets": "Wallets",
439439
"we-couldnt-find-that-page": "We couldn't find that page",
440+
"error-page-title": "Oops! Something went wrong",
441+
"error-page-description": "You can help us improve by reporting this issue on our <a href='https://github.com/ethereum/ethereum-org-website/issues/new?label%3A%22bug%20%F0%9F%90%9B%22&template=bug_report.yaml'>GitHub repository</a>.",
442+
"error-page-home-link": "Return to the home page",
440443
"web3": "What is Web3?",
441444
"web3-title": "Web3",
442445
"website-last-updated": "Website last updated",

0 commit comments

Comments
 (0)