Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/css/pagination.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
}

.rc-pagination {
@apply flex flex-row flex-wrap justify-center items-center gap-2 text-lg;
@apply flex flex-row flex-nowrap justify-center items-center gap-2 text-lg;
}

.rc-pagination > li {
Expand All @@ -50,6 +50,10 @@
@apply cursor-not-allowed opacity-35;
}

.rc-pagination-simple > .rc-pagination-options {
@apply hidden;
}

.rc-pagination a,
.rc-pagination button {
@apply flex min-h-11 min-w-11 items-center justify-center rounded-full focus:outline-none;
Expand Down
4 changes: 4 additions & 0 deletions src/pages/gallery_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ import chevronLeft from "@iconify/icons-akar-icons/chevron-left";
import chevronRight from "@iconify/icons-akar-icons/chevron-right";
import moreHorizontal from "@iconify/icons-akar-icons/more-horizontal";
import Pagination from "rc-pagination";
import { useMediaQuery } from "react-responsive";
import "../css/pagination.css";
import ImageWithPlaceholder from "../components/image-with-placeholder";
import useGoogleAdsConversion from "../hooks/useGoogleAdsConversion";

const GalleryList = ({ data }) => {
const [currentPage, setCurrentPage] = useState(1);
const [searchQuery, setSearchQuery] = useState("");
const isSmallDevice = useMediaQuery({ maxWidth: 639 });

// Google Ads 轉換追蹤
useGoogleAdsConversion();
Expand Down Expand Up @@ -107,6 +109,7 @@ const GalleryList = ({ data }) => {
total={itemCount}
pageSize={perPage}
showTitle={false}
simple={isSmallDevice ? { readOnly: true } : false}
prevIcon={
<Icon icon={chevronLeft} width="24" aria-hidden="true" />
}
Expand Down Expand Up @@ -148,6 +151,7 @@ const GalleryList = ({ data }) => {
total={itemCount}
pageSize={perPage}
showTitle={false}
simple={isSmallDevice ? { readOnly: true } : false}
prevIcon={
<Icon icon={chevronLeft} width="24" aria-hidden="true" />
}
Expand Down