Skip to content

Commit 4ff7719

Browse files
authored
Fix/408 mypage temperature bug (#411)
* Fix: 마이페이지 온도 동적 스타일링 버그 해결 Related to: #408 * Fix: 마이페이지 온도 동적 스타일링 버그 해결 Related to: #408
1 parent efb8b16 commit 4ff7719

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: src/components/MyPage/MyPage/Temperature/Temperature.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ interface Props {
66

77
function Temperature({ temperature }: Props) {
88
const temperatureColorConditions = [
9-
{ max: 10, color: "#7EC7FC" },
10-
{ max: 20, color: "#72EF86" },
11-
{ max: 36.5, color: "#FFEF5C" },
12-
{ max: 65, color: "#FFAD62" },
13-
{ max: 100, color: "#E76B6B" },
9+
{ max: 10, color: "bg-[#7EC7FC]" },
10+
{ max: 20, color: "bg-[#72EF86]" },
11+
{ max: 36.5, color: "bg-[#FFEF5C]" },
12+
{ max: 65, color: "bg-[#FFAD62]" },
13+
{ max: 100, color: "bg-[#E76B6B]" },
1414
];
1515

1616
const getTemperatureColor = () => {
1717
for (const condition of temperatureColorConditions) {
1818
if (temperature <= condition.max) {
19-
return `bg-[${condition.color}]`;
19+
return condition.color;
2020
}
2121
}
2222
};

0 commit comments

Comments
 (0)