Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions app/(web)/aktuelles/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { getTitle, PageProps } from "#/lib/page";
import { PaginatedArticles } from "#/content/article";
import { getURL } from "#/lib/url";
import { getArticles, PaginatedArticles } from "#/content/article";
import { Metadata } from "next";
import { aktuelles } from "#/content/sitemap";
import { Section } from "#/components/web/section/Section";
Expand All @@ -17,10 +16,7 @@ const PAGE_SIZE = 20;
export default async function Aktuelles(props: PageProps) {
const searchParams = await props.searchParams;
const page = searchParams.page ? Number.parseInt(searchParams.page.toString()) : 1;
const articlesResponse = await fetch(`${getURL()}/api/articles?page=${page}&pageSize=${PAGE_SIZE}`, {
next: { revalidate: false },
});
const paginatedArticles: PaginatedArticles = await articlesResponse.json();
const paginatedArticles: PaginatedArticles = getArticles(page, PAGE_SIZE, "public/content/article");
return (
<PageContent>
<Section title={aktuelles.name}>
Expand Down
1 change: 0 additions & 1 deletion components/web/events/EventGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export function EventGrid() {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data: Event[] = await response.json();
console.log(data); // Debugging: Log the fetched data to see its structure
setEvents(data);
} catch (e) {
if (e instanceof Error) {
Expand Down