diff --git a/src/components/modalContent/MonthlyChartVoteList.jsx b/src/components/modalContent/MonthlyChartVoteList.jsx
new file mode 100644
index 0000000..aefc010
--- /dev/null
+++ b/src/components/modalContent/MonthlyChartVoteList.jsx
@@ -0,0 +1,26 @@
+import MonthlyChartItem from '@/pages/listPage/monthlyChart/MonthlyChartItem';
+
+const MonthlyChartVoteList = ({ idols, selectedIdol, setSelectedIdol }) => {
+ return (
+
+ {idols.map((idol, idx) => (
+
setSelectedIdol(idol.id)}>
+
+
+
+
+
+ ))}
+
+ );
+};
+
+export default MonthlyChartVoteList;
diff --git a/src/components/modalContent/MonthlyChartVoteModal.jsx b/src/components/modalContent/MonthlyChartVoteModal.jsx
new file mode 100644
index 0000000..3b44512
--- /dev/null
+++ b/src/components/modalContent/MonthlyChartVoteModal.jsx
@@ -0,0 +1,67 @@
+import { useState, useEffect } from 'react';
+import MonthlyChartVoteList from '@/components/modalContent/MonthlyChartVoteList';
+import { getLists } from '@/apis/monthlyChartApi';
+import PrimaryButton from '@/components/PrimaryButton';
+
+const MonthlyChartVoteModal = ({ gender }) => {
+ const [cursor, setCursor] = useState(0);
+ const [idolData, setIdolData] = useState([]);
+ const [loading, setLoading] = useState(false);
+ const [selectedIdol, setSelectedIdol] = useState(0);
+
+ const loadIdolData = async () => {
+ setLoading(true);
+ try {
+ const response = await getLists(gender, cursor, 10);
+ if (cursor !== 0) {
+ setIdolData((prev) => [...prev, ...response.idols]);
+ } else {
+ setIdolData(response.idols);
+ }
+ setCursor(response.nextCursor);
+ } catch (error) {
+ console.error(error);
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ const loadMoreData = () => {
+ if (cursor === null) {
+ alert('불러올 데이터가 없습니다.');
+ } else {
+ loadIdolData();
+ }
+ };
+
+ useEffect(() => {
+ setIdolData([]);
+ setCursor(0);
+ loadIdolData();
+ }, [gender]);
+
+ return (
+
+ {loading ? (
+
로딩 중입니다...
+ ) : (
+
+ )}
+
+
+ 투표하기
+
+
+ 투표하는 데 1000 크레딧이
+ 소모됩니다.
+
+
+
+ );
+};
+
+export default MonthlyChartVoteModal;
diff --git a/src/pages/listPage/ListPage.jsx b/src/pages/listPage/ListPage.jsx
index 51443bb..19e091b 100644
--- a/src/pages/listPage/ListPage.jsx
+++ b/src/pages/listPage/ListPage.jsx
@@ -11,6 +11,7 @@ import DonationModalContent from '@/components/modalContent/DonationModalContent
import leftTopGradient from '@/assets/images/leftTopGradient.png';
import DonationSuccess from '@/components/modalContent/DonationSuccess';
import MonthlyChartSection from '@/pages/listPage/monthlyChart/MonthlyChartSection';
+import MonthlyChartVoteModal from '../../components/modalContent/MonthlyChartVoteModal';
function ListPage() {
const [isModalOpen, setIsModalOpen] = useState(false);
@@ -18,6 +19,7 @@ function ListPage() {
const [credits, setCredits] = useState(getCredits());
const [selectedAmount, setSelectedAmount] = useState(null);
const [selectedItem, setSelectedItem] = useState(null);
+ const [gender, setGender] = useState('female');
useEffect(() => {
setCredits(getCredits());
@@ -53,6 +55,7 @@ function ListPage() {
creditNotEnough: '',
donation: '후원하기',
donationSuccess: '',
+ vote: `이달의 ${gender === 'female' ? '여자' : '남자'} 아이돌`,
}[modalStep];
return (
@@ -69,7 +72,13 @@ function ListPage() {
credits={credits}
/>
openModal('donation', item)} />
-
+ {
+ openModal('vote');
+ }}
+ gender={gender}
+ setGender={setGender}
+ />
{isModalOpen && (
@@ -102,6 +111,7 @@ function ListPage() {
{modalStep === 'donationSuccess' && (
)}
+ {modalStep === 'vote' && }
)}
diff --git a/src/pages/listPage/monthlyChart/MonthlyChartItem.jsx b/src/pages/listPage/monthlyChart/MonthlyChartItem.jsx
index d05ffed..7f95d36 100644
--- a/src/pages/listPage/monthlyChart/MonthlyChartItem.jsx
+++ b/src/pages/listPage/monthlyChart/MonthlyChartItem.jsx
@@ -1,26 +1,56 @@
-import IdolCard from '@/components/IdolCard';
-
-const MonthlyChartItem = ({ idol }) => {
- const { profilePicture, name, rank, group, totalVotes } = idol;
+const MonthlyChartItem = ({ idol, rank, layout = 'default', children }) => {
+ const { profilePicture, name, group, totalVotes } = idol;
return (