Skip to content

Commit 138d1a6

Browse files
committed
frontend: Add 404 page
1 parent 6c3b697 commit 138d1a6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from 'react';
2+
import { Link } from 'react-router-dom';
3+
4+
import { tr } from '../i18n';
5+
6+
function NotFoundPage() {
7+
return (
8+
<div className="container text-center" style={{ marginTop: '100px' }}>
9+
<h1>404</h1>
10+
<p>{tr('Page not found.', 'ページが見つかりません。')}</p>
11+
<Link to="/">{tr('Go to Home', 'ホームへ戻る')}</Link>
12+
</div>
13+
);
14+
}
15+
16+
export default NotFoundPage;

frontend/src/components/Routes.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import StandingsRevealPage from './standings/StandingsRevealPage';
2525
import GA from './common/GA';
2626
import LoadingCheck from './common/LoadingCheck';
2727
import LoadingPage from './LoadingPage';
28+
import NotFoundPage from './NotFoundPage';
2829
import siteconfig from '../siteconfig';
2930

3031
function Routes() {
@@ -42,6 +43,7 @@ function Routes() {
4243
{teamPageRoute}
4344
<Route path="/settings/" component={SettingsPage} />
4445
<Route path="/reveal/" component={StandingsRevealPage} />
46+
<Route component={NotFoundPage} />
4547
</Switch>
4648
</Frame>
4749
</LoadingCheck>

0 commit comments

Comments
 (0)