Skip to content

Commit 43df509

Browse files
committed
refactor: enhance layout and styling for TagArticleFeed component
- Wrapped TagArticleFeed in a flex container for improved spacing and layout. - Adjusted error state styling for better visual consistency. - Simplified the outer div structure in TagArticleFeed for cleaner markup. - Removed unused test page file.
1 parent e4081e6 commit 43df509

3 files changed

Lines changed: 5 additions & 16 deletions

File tree

src/app/tags/[tag_name]/_components/TagArticleFeed.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const TagArticleFeed: React.FC<TagArticleFeedProps> = ({ tag }) => {
6868
if (tagFeedQuery.isError) {
6969
// Show error state
7070
return (
71-
<div className="flex flex-col items-center justify-center py-12">
71+
<div className="flex flex-col items-center justify-center">
7272
<h2 className="text-xl font-semibold text-gray-900 dark:text-white mb-2">
7373
Error loading articles
7474
</h2>
@@ -101,7 +101,7 @@ const TagArticleFeed: React.FC<TagArticleFeedProps> = ({ tag }) => {
101101

102102
return (
103103
<>
104-
<div className="mb-8 p-4">
104+
<div>
105105
<h1 className="text-3xl font-bold text-gray-900 dark:text-white">
106106
{_t(`Articles tagged with "$"`, [tag?.name])}
107107
</h1>

src/app/tags/[tag_name]/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ export default async function TagPage({ params }: TagPageProps) {
2626
RightSidebar={<HomeRightSidebar />}
2727
NavbarTrailing={<SidebarToggleButton />}
2828
>
29-
<TagArticleFeed tag={tag?.data} />
29+
<div className="flex flex-col gap-3 p-2">
30+
<TagArticleFeed tag={tag?.data} />
31+
</div>
3032
</HomepageLayout>
3133
);
3234
}

src/app/test/page.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)