feat(client): migrate fourOhFour (#42626)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
4737d96084
commit
e1e0fe02bf
@ -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 (
|
||||
<div className='notfound-page-wrapper'>
|
||||
<Helmet title={t('404.page-not-found') + '| freeCodeCamp'} />
|
4
client/src/declarations.d.ts
vendored
4
client/src/declarations.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user