Skip to content

Commit 18b19c0

Browse files
committed
77
1 parent 295d3b7 commit 18b19c0

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/pages/HomePage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const HomePage = () => {
22
return (
3-
<div>Home Page</div>
3+
<h1>프로젝트로 배우는 리액트</h1>
44
);
55
};
66

src/pages/NotFoundPage.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const NotFoundPage = () => {
2+
return (
3+
<div>404 Page Not Found</div>
4+
)
5+
}
6+
7+
export default NotFoundPage;

src/routes.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import EditPage from './pages/EditPage';
44
import ListPage from './pages/ListPage';
55
import AdminPage from './pages/AdminPage';
66
import ShowPage from './pages/ShowPage';
7+
import NotFoundPage from './pages/NotFoundPage';
78

89
const routes = [
910
{
@@ -32,6 +33,10 @@ const routes = [
3233
{
3334
path: '/blogs/:id',
3435
component: ShowPage
36+
},
37+
{
38+
path: '*',
39+
component: NotFoundPage
3540
}
3641
];
3742

0 commit comments

Comments
 (0)