From e1e0fe02bfd5a9c3934f3c63eafdfab29af48d5c Mon Sep 17 00:00:00 2001 From: "Nicholas Carrigan (he/him)" Date: Mon, 28 Jun 2021 10:57:50 -0700 Subject: [PATCH] feat(client): migrate fourOhFour (#42626) Co-authored-by: Shaun Hamilton --- client/src/components/FourOhFour/{index.js => index.tsx} | 7 ++++--- client/src/declarations.d.ts | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) rename client/src/components/FourOhFour/{index.js => index.tsx} (83%) diff --git a/client/src/components/FourOhFour/index.js b/client/src/components/FourOhFour/index.tsx similarity index 83% rename from client/src/components/FourOhFour/index.js rename to client/src/components/FourOhFour/index.tsx index b69465e0a6..dbda4bb868 100644 --- a/client/src/components/FourOhFour/index.js +++ b/client/src/components/FourOhFour/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; import Helmet from 'react-helmet'; -import { Spacer } from '../../components/helpers'; +import { Spacer } from '../helpers'; import { Link } from 'gatsby'; import { useTranslation } from 'react-i18next'; @@ -9,9 +9,10 @@ import { randomQuote } from '../../utils/get-words'; import './404.css'; -const FourOhFour = () => { +const FourOhFour = (): JSX.Element => { const { t } = useTranslation(); - const quote = randomQuote(); + // TODO: Remove this type coercion when get-words.js is migrated + const quote = randomQuote() as { quote: string; author: string }; return (
diff --git a/client/src/declarations.d.ts b/client/src/declarations.d.ts index dceb9ae3f8..83cd1b3d1b 100644 --- a/client/src/declarations.d.ts +++ b/client/src/declarations.d.ts @@ -5,3 +5,7 @@ declare module '@types/react-redux'; declare module '@types/validator'; declare module '@types/lodash-es'; declare module 'react-lazy-load'; +declare module '*.svg' { + const content: string; + export default content; +}