From e672145e5268f68b49681197e7300b9b91074f32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Ra=C4=8D=C3=A1k?=
Date: Tue, 10 Sep 2024 12:42:27 +0200
Subject: [PATCH 1/2] Update 404 page to the new design
---
baker/siteRenderers.tsx | 2 +-
site/NotFoundPage.tsx | 82 +++++++++++++++---------
site/NotFoundPageForm.tsx | 49 +++++++++++++++
site/NotFoundPageMain.tsx | 14 ++---
site/owid.scss | 129 +++++++++++++++++++++++---------------
5 files changed, 188 insertions(+), 88 deletions(-)
create mode 100644 site/NotFoundPageForm.tsx
diff --git a/baker/siteRenderers.tsx b/baker/siteRenderers.tsx
index 0126b7d1e7d..678d1685c11 100644
--- a/baker/siteRenderers.tsx
+++ b/baker/siteRenderers.tsx
@@ -4,7 +4,7 @@ import { ChartsIndexPage, ChartIndexItem } from "../site/ChartsIndexPage.js"
import { DynamicCollectionPage } from "../site/collections/DynamicCollectionPage.js"
import { StaticCollectionPage } from "../site/collections/StaticCollectionPage.js"
import { SearchPage } from "../site/search/SearchPage.js"
-import { NotFoundPage } from "../site/NotFoundPage.js"
+import NotFoundPage from "../site/NotFoundPage.js"
import { DonatePage } from "../site/DonatePage.js"
import { ThankYouPage } from "../site/ThankYouPage.js"
import OwidGdocPage from "../site/gdocs/OwidGdocPage.js"
diff --git a/site/NotFoundPage.tsx b/site/NotFoundPage.tsx
index e79bc1706ee..659f491bb5a 100644
--- a/site/NotFoundPage.tsx
+++ b/site/NotFoundPage.tsx
@@ -1,48 +1,39 @@
-import React from "react"
+import * as React from "react"
import { Head } from "./Head.js"
import { SiteHeader } from "./SiteHeader.js"
import { SiteFooter } from "./SiteFooter.js"
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome/index.js"
-import { faSearch } from "@fortawesome/free-solid-svg-icons"
import { Html } from "./Html.js"
+import NotFoundPageForm from "./NotFoundPageForm.js"
-export const NotFoundPage = (props: { baseUrl: string }) => {
+export default function NotFoundPage({ baseUrl }: { baseUrl: string }) {
return (
-
+
- Sorry, that page doesn’t exist!
-
- You can search below or{" "}
- return to the homepage.
+
+
+ Sorry, that page doesn’t exist!
+
+
+ You may have followed an outdated link or have mistyped
+ the URL.
-
+
+ You can search for what you were hoping to find below or{" "}
+ visit our homepage.
+
+
+
+
-
+