File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 11import { getTitle , PageProps } from "#/lib/page" ;
2- import { PaginatedArticles } from "#/content/article" ;
3- import { getURL } from "#/lib/url" ;
2+ import { getArticles , PaginatedArticles } from "#/content/article" ;
43import { Metadata } from "next" ;
54import { aktuelles } from "#/content/sitemap" ;
65import { Section } from "#/components/web/section/Section" ;
@@ -17,10 +16,7 @@ const PAGE_SIZE = 20;
1716export default async function Aktuelles ( props : PageProps ) {
1817 const searchParams = await props . searchParams ;
1918 const page = searchParams . page ? Number . parseInt ( searchParams . page . toString ( ) ) : 1 ;
20- const articlesResponse = await fetch ( `${ getURL ( ) } /api/articles?page=${ page } &pageSize=${ PAGE_SIZE } ` , {
21- next : { revalidate : false } ,
22- } ) ;
23- const paginatedArticles : PaginatedArticles = await articlesResponse . json ( ) ;
19+ const paginatedArticles : PaginatedArticles = getArticles ( page , PAGE_SIZE , "public/content/article" ) ;
2420 return (
2521 < PageContent >
2622 < Section title = { aktuelles . name } >
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ export function EventGrid() {
1919 throw new Error ( `HTTP error! status: ${ response . status } ` ) ;
2020 }
2121 const data : Event [ ] = await response . json ( ) ;
22- console . log ( data ) ; // Debugging: Log the fetched data to see its structure
2322 setEvents ( data ) ;
2423 } catch ( e ) {
2524 if ( e instanceof Error ) {
You can’t perform that action at this time.
0 commit comments