"use client" import { useState } from "react" import Image from "@/components/Image" import Pagination from "@/components/MyPages/Pagination" import Grids from "@/components/TempDesignSystem/Grids" import Title from "@/components/TempDesignSystem/Text/Title" import Redeem from "./Redeem" import styles from "./current.module.css" import type { CurrentRewardsClientProps } from "@/types/components/myPages/myPage/accountPage" export default function ClientCurrentRewards({ rewards, pageSize, showRedeem, }: CurrentRewardsClientProps) { const [currentPage, setCurrentPage] = useState(1) const totalPages = Math.ceil(rewards.length / pageSize) const startIndex = (currentPage - 1) * pageSize const endIndex = startIndex + pageSize const currentRewards = rewards.slice(startIndex, endIndex) return (