File tree Expand file tree Collapse file tree 1 file changed +25
-20
lines changed
Expand file tree Collapse file tree 1 file changed +25
-20
lines changed Original file line number Diff line number Diff line change @@ -151,16 +151,18 @@ const Chart = () => {
151151 < ChartIdol style = { { marginBottom : "20px" } } >
152152 < ChartIdolLeft
153153 onClick = { ( ) => {
154- setActiveTab ( "female" ) ;
155- if ( window . matchMedia ( "(max-width: 425px)" ) . matches ) {
156- setVisibleCount ( 5 ) ;
157- } else if (
158- window . matchMedia ( "(min-width: 426px) and (max-width: 768px)" )
159- . matches
160- ) {
161- setVisibleCount ( 5 ) ;
162- } else {
163- setVisibleCount ( 10 ) ;
154+ if ( ! isFemale ) {
155+ setActiveTab ( "female" ) ;
156+ if ( window . matchMedia ( "(max-width: 425px)" ) . matches ) {
157+ setVisibleCount ( 5 ) ;
158+ } else if (
159+ window . matchMedia ( "(min-width: 426px) and (max-width: 768px)" )
160+ . matches
161+ ) {
162+ setVisibleCount ( 5 ) ;
163+ } else {
164+ setVisibleCount ( 10 ) ;
165+ }
164166 }
165167 } }
166168 style = { {
@@ -173,18 +175,21 @@ const Chart = () => {
173175 >
174176 이달의 여자 아이돌
175177 </ ChartIdolLeft >
178+
176179 < ChartIdolRight
177180 onClick = { ( ) => {
178- setActiveTab ( "male" ) ;
179- if ( window . matchMedia ( "(max-width: 425px)" ) . matches ) {
180- setVisibleCount ( 5 ) ;
181- } else if (
182- window . matchMedia ( "(min-width: 426px) and (max-width: 768px)" )
183- . matches
184- ) {
185- setVisibleCount ( 5 ) ;
186- } else {
187- setVisibleCount ( 10 ) ;
181+ if ( isFemale ) {
182+ setActiveTab ( "male" ) ;
183+ if ( window . matchMedia ( "(max-width: 425px)" ) . matches ) {
184+ setVisibleCount ( 5 ) ;
185+ } else if (
186+ window . matchMedia ( "(min-width: 426px) and (max-width: 768px)" )
187+ . matches
188+ ) {
189+ setVisibleCount ( 5 ) ;
190+ } else {
191+ setVisibleCount ( 10 ) ;
192+ }
188193 }
189194 } }
190195 style = { {
You can’t perform that action at this time.
0 commit comments