-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: updated news component names
- Loading branch information
1 parent
5f62df8
commit 8996a36
Showing
8 changed files
with
34 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 6 additions & 9 deletions
15
src/components/news/NewsItemGridSuspense.tsx → src/components/news/ItemGridSuspense.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,26 @@ | ||
import * as React from 'react'; | ||
|
||
import { PaginationCarouselSkeleton } from '@/components/layout/PaginationCarouselSkeleton'; | ||
import { | ||
NewsItemGrid, | ||
type NewsItemGridProps, | ||
} from '@/components/news/NewsItemGrid'; | ||
import { NewsItemSkeleton } from '@/components/news/NewsItemSkeleton'; | ||
import { ArticleItemSkeleton } from '@/components/news/ArticleItemSkeleton'; | ||
import { ItemGrid, type ItemGridProps } from '@/components/news/ItemGrid'; | ||
|
||
function NewsItemGridSuspense({ ...props }: NewsItemGridProps) { | ||
function ItemGridSuspense({ ...props }: ItemGridProps) { | ||
return ( | ||
<React.Suspense | ||
fallback={ | ||
<> | ||
<div className='grid min-h-[752px] grid-cols-1 gap-4 sm:min-h-[368px] sm:grid-cols-2 lg:min-h-[240px] lg:grid-cols-3'> | ||
{Array.from({ length: 6 }).map((_, index) => ( | ||
<NewsItemSkeleton key={index} /> | ||
<ArticleItemSkeleton key={index} /> | ||
))} | ||
</div> | ||
<PaginationCarouselSkeleton className='my-6' t={props.t} /> | ||
</> | ||
} | ||
> | ||
<NewsItemGrid {...props} /> | ||
<ItemGrid {...props} /> | ||
</React.Suspense> | ||
); | ||
} | ||
|
||
export { NewsItemGridSuspense }; | ||
export { ItemGridSuspense }; |