Skip to content

Commit

Permalink
fix chevron
Browse files Browse the repository at this point in the history
  • Loading branch information
ClanCo committed Nov 14, 2024
1 parent 3d8f437 commit 279b9ba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/src/ui/elements/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ const PaginationLink = ({
);
PaginationLink.displayName = "PaginationLink";

const isMdOrLarger = () => {
if (typeof window === "undefined") return false;
return window.matchMedia("(min-width: 768px)").matches;
};

const PaginationPrevious = ({
className,
...props
Expand All @@ -75,7 +80,7 @@ const PaginationPrevious = ({
{...props}
>
<ChevronLeftIcon className="h-4 w-4" />
<span>Previous</span>
{!isMdOrLarger && <span>Previous</span>}
</PaginationLink>
);
PaginationPrevious.displayName = "PaginationPrevious";
Expand All @@ -90,7 +95,7 @@ const PaginationNext = ({
className={cn("gap-1 pr-2.5", className)}
{...props}
>
<span>Next</span>
{!isMdOrLarger && <span>Next</span>}
<ChevronRightIcon className="h-4 w-4" />
</PaginationLink>
);
Expand Down

0 comments on commit 279b9ba

Please sign in to comment.