Skip to content

Commit 914d982

Browse files
Fix readDocuments usage
1 parent f241237 commit 914d982

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/(sections)/news/[slug]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { readDocuments } from '@/db/api/documents'
33
import classes from './page.module.css'
44

55
const NewsLayout = async ({ children }: { children: React.ReactNode }) => {
6-
const documents = await readDocuments()
6+
const documents = await readDocuments({ type: 'newsItem' })
77

88
return (
99
<div className={classes.layout}>

src/app/(sections)/news/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const metadata = {
99
}
1010

1111
const NewsPage = async () => {
12-
const documents = await readDocuments()
12+
const documents = await readDocuments({ type: 'newsItem' })
1313

1414
return (
1515
<div className={classes.component}>

0 commit comments

Comments
 (0)