@@ -14,4 +14,4 @@ function NewsItemSkeleton() {
);
}
-export { NewsItemSkeleton };
+export { ArticleItemSkeleton };
diff --git a/src/components/news/NewsCardGrid.tsx b/src/components/news/CardGrid.tsx
similarity index 81%
rename from src/components/news/NewsCardGrid.tsx
rename to src/components/news/CardGrid.tsx
index 385350b..35b6d2c 100644
--- a/src/components/news/NewsCardGrid.tsx
+++ b/src/components/news/CardGrid.tsx
@@ -1,8 +1,8 @@
import { cx } from '@/lib/utils';
-import { NewsCard } from '@/components/news/NewsCard';
+import { ArticleCard } from '@/components/news/ArticleCard';
-type NewsCardGridProps = {
+type CardGridProps = {
newsData: {
id: number;
internal: boolean;
@@ -15,11 +15,11 @@ type NewsCardGridProps = {
};
};
-function NewsCardGrid({ newsData, t }: NewsCardGridProps) {
+function CardGrid({ newsData, t }: CardGridProps) {
return (
{newsData.slice(0, 4).map((data, index) => (
-
}
>
-
+
);
}
-export { NewsCardGridSuspense };
+export { CardGridSuspense };
diff --git a/src/components/news/NewsItemGrid.tsx b/src/components/news/ItemGrid.tsx
similarity index 87%
rename from src/components/news/NewsItemGrid.tsx
rename to src/components/news/ItemGrid.tsx
index bb0926d..4818839 100644
--- a/src/components/news/NewsItemGrid.tsx
+++ b/src/components/news/ItemGrid.tsx
@@ -3,9 +3,9 @@
import { parseAsInteger, useQueryState } from 'nuqs';
import { PaginationCarousel } from '@/components/layout/PaginationCarousel';
-import { NewsItem } from '@/components/news/NewsItem';
+import { ArticleItem } from '@/components/news/ArticleItem';
-type NewsItemGridProps = {
+type ItemGridProps = {
newsData: {
id: number;
internal: boolean;
@@ -24,7 +24,7 @@ type NewsItemGridProps = {
};
};
-function NewsItemGrid({ newsData, t }: NewsItemGridProps) {
+function ItemGrid({ newsData, t }: ItemGridProps) {
const itemsDisplayedAsCards = 4;
const itemsPerPage = 6;
const [page, setPage] = useQueryState(t.page, parseAsInteger.withDefault(1));
@@ -41,7 +41,7 @@ function NewsItemGrid({ newsData, t }: NewsItemGridProps) {
<>
{currentData.map((data) => (
-
{Array.from({ length: 6 }).map((_, index) => (
-
+
))}
>
}
>
-
+
);
}
-export { NewsItemGridSuspense };
+export { ItemGridSuspense };