Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ›ย Fix: ๋””์ž์ธ ์ˆ˜์ • ๋ฐ ๋žญํ‚น index ๋กœ ๋ณ€๊ฒฝ #69

Merged
merged 9 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/components/Carousel/styles.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/';

.arrow {
display: flex;
align-items: center;
Expand All @@ -8,11 +10,23 @@
margin-inline: 15px;
border-radius: 6.67px;

background-color: #1b1b1b;
background: linear-gradient(
90deg,
$color-brand-orange 0%,
$color-brand-pink 100%
);
opacity: 0.8;
transition: opacity 0.5s ease;

cursor: pointer;

&:hover {
background: linear-gradient(
90deg,
$color-brand-pink 0%,
$color-brand-orange 100%
);
}
}

.longArrow {
Expand Down
6 changes: 6 additions & 0 deletions src/pages/ListPage/Credit/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ $color-credit-border: #f1eef9;
}
}

@media (max-width: 550px) {
.container {
padding-inline: 40px;
}
}

@media (max-width: $width-mobile) {
.container {
height: 87px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { motion } from 'framer-motion';
* @param {object} idol ์•„์ด๋Œ ๊ฐ์ฒด
* @param {number} ranking ์•„์ด๋Œ ์ˆœ์œ„
*/
const ChartElement = ({ idol }) => {
const { name, profilePicture, rank } = idol;
const ChartElement = ({ idol, ranking }) => {
const { name, profilePicture } = idol;
const totalVotes = numberWithCommas(idol.totalVotes);

return (
Expand All @@ -26,7 +26,7 @@ const ChartElement = ({ idol }) => {
<div className={styles.img}>
<Profile size="sm" imageUrl={profilePicture} />
</div>
<span className={styles.ranking}>{rank}</span>
<span className={styles.ranking}>{ranking}</span>
<div className={styles.name}>{name}</div>
</div>
<div className={styles.totalVotes}>{totalVotes}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const ChartModal = ({ isOpen, closeModal, idolList, currentTab }) => {
clicked={selectedIdol === idol}
/>
<div className={style.text}>
<span>{idol.rank}</span>
<span>{index + 1}</span>
<div className={style.name}>
<span>
{idol.group} {idol.name}
Expand Down Expand Up @@ -112,4 +112,4 @@ const ChartModal = ({ isOpen, closeModal, idolList, currentTab }) => {
);
};

export default ChartModal;
export default ChartModal;
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

.expand {
width: 94vw;
height: 92vh;
height: 92svh;
}

.chart {
Expand Down Expand Up @@ -98,4 +98,4 @@
> span {
color: $color-brand-orange;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const IdolChart = ({ isLoading, loadingError, idolList }) => {
} else {
return (
<ul className={chartClass}>
{idolList.map((idol) => {
return <ChartElement key={idol.id} idol={idol} />;
{idolList.map((idol, index) => {
return <ChartElement key={idol.id} idol={idol} ranking={index + 1} />;
})}
</ul>
);
Expand Down
2 changes: 1 addition & 1 deletion src/styles/font.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import url('https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/variable/pretendardvariable.min.css');

$font-family: 'Pretendard' !important;
$font-family: 'Pretendard', sans-serif !important;
$font-style: normal !important;

@mixin font-default {
Expand Down