Skip to content

Commit

Permalink
fixed pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
nina1012 committed Oct 29, 2024
1 parent 99c3c00 commit 2aa1196
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/common/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Navbar = () => {
<div className="text-2xl mr-auto">
<LogoLink />
</div>
<ul className="flex items-center">
<ul className="flex items-center text-sm md:text-base">
<Conditional condition={!!data}>
<NavLink href="/" isActive={true}>
<span>Home</span>
Expand Down
8 changes: 4 additions & 4 deletions src/components/common/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function Pagination({
aria-label="pagination"
className="w-full h-full bg-neutral-100 py-4"
>
<ul className="list-style-none py-2 flex items-center justify-center">
<ul className="list-style-none p-2 flex items-center justify-center">
{/* previous button */}
<li
onClick={() =>
Expand All @@ -61,10 +61,10 @@ export default function Pagination({
)}
>
<Link className="pagination-prev-next" href="">
<span className="mr-2 font-lg">
<span className="mr-1 font-lg">
<GrFormPrevious />
</span>{' '}
Previous
Prev
</Link>
</li>

Expand Down Expand Up @@ -100,7 +100,7 @@ export default function Pagination({
>
<Link className="pagination-prev-next" href="">
Next{' '}
<span className="ml-2 font-lg">
<span className="ml-1 font-lg">
<GrFormNext />
</span>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/features/articles/components/ArticleMeta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function ArticleMeta({
<CustomLink
href={`/profile/${username}`}
as={`/profile/${encodeURIComponent(username)}`}
className="flex self-center text-base text-primary mr-2"
className="flex self-start text-base text-primary mr-2"
>
<Image
width={32}
Expand Down
4 changes: 2 additions & 2 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
}

.pagination-link {
@apply relative block rounded bg-primary px-3 py-1.5 mx-2 text-sm font-medium text-white cursor-pointer;
@apply relative inline rounded bg-primary px-3 py-1.5 mx-2 text-sm font-medium text-white cursor-pointer;
}

.pagination-link.active {
@apply bg-primary/50 pointer-events-none border border-neutral-400;
}

.pagination-prev-next {
@apply relative flex items-center rounded bg-transparent px-3 py-1.5 text-sm text-neutral-600 transition-all duration-300 hover:bg-zinc-200 w-[100px] mx-8;
@apply relative flex items-center rounded bg-transparent px-3 py-1.5 text-sm text-neutral-600 transition-all duration-300 hover:bg-zinc-200 w-fit mx-4;
}
}

0 comments on commit 2aa1196

Please sign in to comment.