diff --git a/src/App.tsx b/src/App.tsx
index cc1e76e..3bf64d9 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -8,7 +8,7 @@ import Loading from "./components/Loading"
import Navbar from "./components/Navbar"
import Footer from "./components/Footer"
-import PostList from "./pages/PostList"
+import Home from "./pages/Home"
import Search from "./pages/Search"
import Page from "./pages/Page"
import NotFound from "./pages/NotFound"
@@ -80,7 +80,7 @@ export default function App() {
) : (
- } />
+ } />
} />
} />
} />
diff --git a/src/pages/PostList/ShowMoreButton.tsx b/src/pages/Home/ShowMoreButton.tsx
similarity index 100%
rename from src/pages/PostList/ShowMoreButton.tsx
rename to src/pages/Home/ShowMoreButton.tsx
diff --git a/src/pages/PostList/index.tsx b/src/pages/Home/index.tsx
similarity index 83%
rename from src/pages/PostList/index.tsx
rename to src/pages/Home/index.tsx
index 6e51030..dd4259b 100644
--- a/src/pages/PostList/index.tsx
+++ b/src/pages/Home/index.tsx
@@ -3,7 +3,7 @@
* show posts in recent order
*/
-import { useEffect, useState } from "react"
+import { useContext, useEffect, useState } from "react"
import { Helmet } from "react-helmet-async"
import styled from "styled-components"
@@ -13,7 +13,9 @@ import ShowMoreButton from "./ShowMoreButton"
import _map from "../../data/map.json"
import theming from "../../styles/theming"
-import { Map } from "../../../types/types"
+import { globalContext } from "../../globalContext"
+
+import type { Map } from "../../../types/types"
const map: Map = _map
@@ -27,11 +29,8 @@ const StyledPostList = styled.div`
})};
`
-interface Props {
- title: string
-}
-
-const PostList = (props: Props) => {
+const PostList = () => {
+ const { globalState } = useContext(globalContext)
const [howMany, setHowMany] = useState(5)
const [postsLength, setPostsLength] = useState(0)
const [postCards, setPostCards] = useState([])
@@ -67,17 +66,17 @@ const PostList = (props: Props) => {
return (
<>
- pomp | {props.title}
+ pomp | Home
-
+
- Recent Posts
+ {globalState.locale == "en" ? "Recent Posts" : "최근 포스트"}
{postCards}
{postsLength > howMany && (