diff --git a/app/wishes/page.tsx b/app/wishes/page.tsx index fc83776..5a51d02 100644 --- a/app/wishes/page.tsx +++ b/app/wishes/page.tsx @@ -191,7 +191,7 @@ export default function WishesPage() { // 分頁相關狀態 const [currentPage, setCurrentPage] = useState(1) - const [itemsPerPage] = useState(5) + const [itemsPerPage] = useState(3) const [paginatedWishes, setPaginatedWishes] = useState([]) const [totalPages, setTotalPages] = useState(0) diff --git a/components/wish-card.tsx b/components/wish-card.tsx index dfa217a..0ea3e31 100644 --- a/components/wish-card.tsx +++ b/components/wish-card.tsx @@ -279,20 +279,31 @@ export default function WishCard({ wish }: WishCardProps) {
-
-
-
- - - {likeCount > 0 ? `${likeCount} 人也遇到相同問題` : "成為第一個表達支持的人"} + {/* 手機端優化:改為上下布局避免擠壓 */} +
+ {/* 第一行:支持數量和愛心顯示 */} +
+
+ + + {likeCount > 0 ? ( + {likeCount} 人也遇到 + ) : ( + 成為第一個支持者 + )} + + {likeCount > 0 ? `${likeCount} 人也遇到相同問題` : "成為第一個表達支持的人"} +
+ + {/* 愛心動畫區域 - 手機端縮小 */} {likeCount > 0 && ( -
+
{[...Array(Math.min(likeCount, 5))].map((_, i) => ( @@ -302,30 +313,34 @@ export default function WishCard({ wish }: WishCardProps) { )}
- + {/* 第二行:按讚按鈕 - 手機端更緊湊 */} +
+ +
{hasLiked && (