@@ -13,7 +13,11 @@ npm install @changespage/react react-markdown
1313
1414``` tsx title="pages/changelog.tsx"
1515import type { InferGetServerSidePropsType } from " next" ;
16- import { createChangesPageClient , usePosts , getTagLabel } from " @changespage/react" ;
16+ import {
17+ createChangesPageClient ,
18+ usePosts ,
19+ getTagLabel ,
20+ } from " @changespage/react" ;
1721import Markdown from " react-markdown" ;
1822
1923const client = createChangesPageClient ({
@@ -60,7 +64,11 @@ export default function ChangelogPage({
6064
6165``` tsx title="pages/changelog.tsx"
6266import type { InferGetStaticPropsType } from " next" ;
63- import { createChangesPageClient , usePosts , getTagLabel } from " @changespage/react" ;
67+ import {
68+ createChangesPageClient ,
69+ usePosts ,
70+ getTagLabel ,
71+ } from " @changespage/react" ;
6472import Markdown from " react-markdown" ;
6573
6674const client = createChangesPageClient ({
@@ -71,7 +79,7 @@ export async function getStaticProps() {
7179 const initialData = await client .getPosts ({ limit: 10 });
7280 return {
7381 props: { initialData },
74- revalidate: 60 ,
82+ revalidate: 86400 ,
7583 };
7684}
7785
@@ -109,7 +117,11 @@ export default function ChangelogPage({
109117## Client-Only
110118
111119``` tsx title="pages/changelog.tsx"
112- import { createChangesPageClient , usePosts , getTagLabel } from " @changespage/react" ;
120+ import {
121+ createChangesPageClient ,
122+ usePosts ,
123+ getTagLabel ,
124+ } from " @changespage/react" ;
113125import Markdown from " react-markdown" ;
114126
115127const client = createChangesPageClient ({
@@ -149,7 +161,12 @@ export default function ChangelogPage() {
149161## With Tailwind CSS
150162
151163``` tsx title="pages/changelog.tsx"
152- import { createChangesPageClient , usePosts , getTagLabel , type PostTag } from " @changespage/react" ;
164+ import {
165+ createChangesPageClient ,
166+ usePosts ,
167+ getTagLabel ,
168+ type PostTag ,
169+ } from " @changespage/react" ;
153170import Markdown from " react-markdown" ;
154171
155172const client = createChangesPageClient ({
@@ -178,7 +195,10 @@ export default function ChangelogPage() {
178195 return (
179196 <div className = " mx-auto max-w-2xl space-y-8 px-4 py-8" >
180197 { posts .map ((post ) => (
181- <article key = { post .id } className = " rounded-lg border border-gray-200 p-6" >
198+ <article
199+ key = { post .id }
200+ className = " rounded-lg border border-gray-200 p-6"
201+ >
182202 <div className = " mb-3 flex flex-wrap gap-2" >
183203 { post .tags .map ((tag ) => (
184204 <span
@@ -189,7 +209,9 @@ export default function ChangelogPage() {
189209 </span >
190210 ))}
191211 </div >
192- <h2 className = " mb-2 text-xl font-semibold text-gray-900" >{ post .title } </h2 >
212+ <h2 className = " mb-2 text-xl font-semibold text-gray-900" >
213+ { post .title }
214+ </h2 >
193215 <div className = " prose prose-sm text-gray-600" >
194216 <Markdown >{ post .plain_text_content } </Markdown >
195217 </div >
0 commit comments