Skip to content

Commit

Permalink
fix: add if in 404 page (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
h3770k1k1 authored Jun 24, 2024
1 parent d694447 commit 31f428c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/pages/404.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import React from 'react';
import React, { useEffect } from 'react';
import { useTranslation } from 'react-i18next';

import NotFound from '../components/NotFound/NotFound';

const NotFoundPage = () => {
const { i18n } = useTranslation();
const currLang = i18n.language;
useEffect(() => {
if (typeof document !== 'undefined' && document !== null) {
document.documentElement.lang = currLang;
}
}, [currLang]);
return (
<>
<NotFound />
Expand Down

0 comments on commit 31f428c

Please sign in to comment.