-
{children}
+
{children}
diff --git a/themes/example/LayoutPage.js b/themes/example/LayoutPage.js
index d8bb93ba..fc19035f 100644
--- a/themes/example/LayoutPage.js
+++ b/themes/example/LayoutPage.js
@@ -1,71 +1,10 @@
-import BLOG from '@/blog.config'
-import { useGlobal } from '@/lib/global'
-import Link from 'next/link'
-import { useRouter } from 'next/router'
+import { BlogList } from './components/BlogList'
import LayoutBase from './LayoutBase'
export const LayoutPage = props => {
- const { page } = props
- const { posts, postCount } = props
-
- const { locale } = useGlobal()
- const router = useRouter()
- const totalPage = Math.ceil(postCount / BLOG.POSTS_PER_PAGE)
-
- const showNext =
- page < totalPage &&
- posts.length === BLOG.POSTS_PER_PAGE &&
- posts.length < postCount
-
- const currentPage = +page
return (
- {posts.map(p => (
-
- ))}
-
-
+
)
}
diff --git a/themes/example/components/BlogList.js b/themes/example/components/BlogList.js
index 057d45ef..a0f4fe6b 100644
--- a/themes/example/components/BlogList.js
+++ b/themes/example/components/BlogList.js
@@ -5,13 +5,12 @@ import { useRouter } from 'next/router'
import Link from 'next/link'
export const BlogList = (props) => {
- const { posts, postCount } = props
+ const { page, posts, postCount } = props
const { locale } = useGlobal()
const router = useRouter()
const totalPage = Math.ceil(postCount / BLOG.POSTS_PER_PAGE)
- const page = 1
const showNext =
page < totalPage &&
posts.length === BLOG.POSTS_PER_PAGE &&
@@ -33,7 +32,7 @@ export const BlogList = (props) => {
by
{BLOG.AUTHOR} on {p.date?.start_date || p.createdTime}
|
{p.category}
-
|
+ {/*
| */}
{/*
2 Comments */}
@@ -44,7 +43,7 @@ export const BlogList = (props) => {
))}