diff --git a/src/pages/List/Chart/index.jsx b/src/pages/List/Chart/index.jsx index 1284d13..9247861 100644 --- a/src/pages/List/Chart/index.jsx +++ b/src/pages/List/Chart/index.jsx @@ -151,16 +151,18 @@ const Chart = () => { { - setActiveTab("female"); - if (window.matchMedia("(max-width: 425px)").matches) { - setVisibleCount(5); - } else if ( - window.matchMedia("(min-width: 426px) and (max-width: 768px)") - .matches - ) { - setVisibleCount(5); - } else { - setVisibleCount(10); + if (!isFemale) { + setActiveTab("female"); + if (window.matchMedia("(max-width: 425px)").matches) { + setVisibleCount(5); + } else if ( + window.matchMedia("(min-width: 426px) and (max-width: 768px)") + .matches + ) { + setVisibleCount(5); + } else { + setVisibleCount(10); + } } }} style={{ @@ -173,18 +175,21 @@ const Chart = () => { > 이달의 여자 아이돌 + { - setActiveTab("male"); - if (window.matchMedia("(max-width: 425px)").matches) { - setVisibleCount(5); - } else if ( - window.matchMedia("(min-width: 426px) and (max-width: 768px)") - .matches - ) { - setVisibleCount(5); - } else { - setVisibleCount(10); + if (isFemale) { + setActiveTab("male"); + if (window.matchMedia("(max-width: 425px)").matches) { + setVisibleCount(5); + } else if ( + window.matchMedia("(min-width: 426px) and (max-width: 768px)") + .matches + ) { + setVisibleCount(5); + } else { + setVisibleCount(10); + } } }} style={{