Skip to content

Commit 65dde57

Browse files
authored
Merge pull request #316 from 1chooo/refactor/#297
refactor(blog): move POSTS_PER_PAGE to the lib (#297)
2 parents b8a3c97 + df6a9ca commit 65dde57

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

apps/web/src/app/blog/page.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
import Link from "next/link";
22
import Image from "next/image";
3+
import Skeleton from "react-loading-skeleton";
4+
import { SkeletonTheme } from "react-loading-skeleton";
35
import PageHeader from "@/components/page-header";
46
import FilterSelectBox from "@/components/blog/filter-select-box";
57
import FilterList from "@/components/blog/filter-list";
68
import MarkdownRenderer from "@/components/markdown/markdown-renderer";
79
import { getBlogPosts } from "@/lib/db/blog";
8-
import Skeleton, { SkeletonTheme } from "react-loading-skeleton";
10+
import { POSTS_PER_PAGE } from "@/lib/constants";
11+
912
import "react-loading-skeleton/dist/skeleton.css";
1013

1114
export const metadata = {
1215
title: "Blog | Hugo ChunHo Lin (1chooo) | Open Source Enthusiast",
1316
description: "Read my thoughts on software development, design, and more.",
1417
};
1518

16-
const POSTS_PER_PAGE = 4;
17-
1819
export default function BlogPage({
1920
searchParams,
2021
}: {

apps/web/src/lib/constants.ts

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ export const TWITTER_USERNAME = '1chooo___';
66
export const LINKEDIN_USERNAME = '1chooo';
77
export const EMAIL = '[email protected]';
88

9+
export const POSTS_PER_PAGE = 4;
10+
911
export const DEVOPS = {
1012
linux: "linux",
1113
aws: "aws",

0 commit comments

Comments
 (0)