diff --git a/src/api/news/index.ts b/src/api/news/index.ts index 82a22d5..d948b12 100644 --- a/src/api/news/index.ts +++ b/src/api/news/index.ts @@ -1,7 +1,9 @@ import { News } from "@/app/main/types/index"; async function getNews(): Promise { - const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/home/news`); + const response: Response = await fetch( + `${process.env.NEXT_PUBLIC_API_URL}/home/news`, + ); if (!response.ok) { throw new Error("Failed to fetch news"); } diff --git a/src/app/main/_components/news-card.tsx b/src/app/main/_components/news-card.tsx index e90a97f..53fa24f 100644 --- a/src/app/main/_components/news-card.tsx +++ b/src/app/main/_components/news-card.tsx @@ -14,7 +14,7 @@ function NewsCard({ title, link }: NewsCardProps) { + + ); + } + + const { children } = this.props; + return children; + } +} + +export default ErrorBoundary;