Skip to content

Commit

Permalink
Merge pull request #94 from LikeLionHGU/#78_hanna_전체피드백반영
Browse files Browse the repository at this point in the history
#78 추가 오류 수정
  • Loading branch information
LeeHannaa authored Aug 6, 2024
2 parents 50e0d5e + 01026f1 commit b419549
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 127 deletions.
2 changes: 1 addition & 1 deletion src/components/CalenderPage/MonthComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function MonthComponent({ monthlyData, month, onDetailCPChange }) {
type: "arrow",
animationDelay: 0,
}}
value={monthlyData?.happinessRate}
value={monthlyData?.happinessRate ? monthlyData?.happinessRate : 0}
style={{ height: "120px", width: "250px" }}
marginInPercent={{
top: 0.12,
Expand Down
55 changes: 31 additions & 24 deletions src/components/MobComponent/MobMainPage/DayStatisticsComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function DayStatisticsComponent({ dayData }) {
</Title>
<HappyBox>
{dailyHappyRate === null ? (
"오늘의 행복지수를 입력해주세요"
"오늘의 행복지수를 입력해주세요 🙌🏻"
) : (
<>
<p style={{ marginTop: "5px", marginBottom: "5px" }}>
Expand All @@ -124,28 +124,33 @@ function DayStatisticsComponent({ dayData }) {
<Horizontal>
<Box>
오늘 과소비 건수
<p style={{ fontSize: "20px", fontWeight: "bold" }}>
{dayData.totalOverConsumptionCount ||
dayData.totalOverConsumptionCount === 0 ? (
<>
<span
style={{
fontSize: "20px",
fontFamily: "SUITExtraBold",
fontWeight: "bold",
color: "#19844A",
}}
>
{dayData.totalOverConsumptionCount}
</span>{" "}
</>
) : (
<span style={{ fontSize: "12px", color: "#19844A" }}>
오늘의 데이터 입력해주세요!
</span>
)}
</p>
{dayData.totalOverConsumptionCount ||
dayData.totalOverConsumptionCount === 0 ? (
<>
<span
style={{
fontSize: "20px",
fontFamily: "SUITExtraBold",
fontWeight: "bold",
color: "#19844A",
}}
>
{dayData.totalOverConsumptionCount}
</span>{" "}
</>
) : (
<span
style={{
fontSize: "11px",
color: "#19844A",
marginTop: "20px",
marginBottom: "20px",
}}
>
오늘의 데이터 입력해주세요!
</span>
)}
</Box>
<Box>
오늘 과소비 항목
Expand All @@ -164,8 +169,10 @@ function DayStatisticsComponent({ dayData }) {
) : (
<p
style={{
fontSize: "12px",
fontSize: "11px",
color: "#19844A",
marginTop: "20px",
marginBottom: "20px",
}}
>
과소비 내역이 없습니다!
Expand Down
209 changes: 107 additions & 102 deletions src/components/MobComponent/MobMainPage/WeekMonthStstisticsComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function WeekMonthStstisticsComponent({ weekData, monthData }) {
marginLeft: "-4px",
}}
>
월간보기
월간
</Horizontal>
}
checkedIcon={
Expand All @@ -173,7 +173,7 @@ function WeekMonthStstisticsComponent({ weekData, monthData }) {
marginLeft: "4px",
}}
>
주간보기
주간
</Horizontal>
}
// boxShadow="0px 1px 5px rgba(0, 0, 0, 0.6)"
Expand All @@ -187,26 +187,31 @@ function WeekMonthStstisticsComponent({ weekData, monthData }) {
</Horizontal>
<HappyBox>
{isMonthly ? (
<>
<p style={{ marginTop: "5px", marginBottom: "5px" }}>
{" "}
이달의 행복지수
</p>
<HappinessInput
value={monthHappyRate}
type="range"
min="0"
max="100"
/>
<p
style={{
margin: 0,
marginLeft: `${monthHappyRate * 2.5}px`,
}}
>
{monthHappyRate} %
</p>
</>
monthHappyRate === null ? (
"이달의 행복지수 정보가 없습니다 🥺"
) : (
<>
<p style={{ marginTop: "5px", marginBottom: "5px" }}>
이달의 행복지수
</p>
<HappinessInput
value={monthHappyRate}
type="range"
min="0"
max="100"
/>
<p
style={{
margin: 0,
marginLeft: `${monthHappyRate * 2.5}px`,
}}
>
{monthHappyRate} %
</p>
</>
)
) : weekHappyRate === null ? (
"이번주의 행복지수 정보가 없습니다 🥺"
) : (
<>
<p style={{ marginTop: "5px", marginBottom: "5px" }}>
Expand Down Expand Up @@ -235,86 +240,86 @@ function WeekMonthStstisticsComponent({ weekData, monthData }) {
{isMonthly ? (
<>
이번달 과소비 비율
<p
style={{
fontSize: "20px",
fontWeight: "bold",
}}
>
{monthData?.overConsumptionRate ? (
<>
<span
style={{
fontSize: "20px",
fontFamily: "SUITExtraBold",
fontWeight: "bold",
color: "#19844A",
}}
>
{monthData.overConsumptionRate}
</span>{" "}
%
<p
style={{
marginBottom: "-30px",
marginLeft: "30%",
fontSize: "8px",
color: "#19844A",
margin: 0,
}}
>
({monthData.totalOverConsumptionCount}건 /
{monthData.totalConsumptionCount}건)
</p>
</>
) : (
<span style={{ fontSize: "12px", color: "#19844A" }}>
과소비 내역이 없습니다!
</span>
)}
</p>
{monthData?.overConsumptionRate ? (
<>
<span
style={{
fontSize: "20px",
fontFamily: "SUITExtraBold",
fontWeight: "bold",
color: "#19844A",
}}
>
{monthData.overConsumptionRate}
</span>{" "}
%
<p
style={{
marginBottom: "-30px",
marginLeft: "30%",
fontSize: "8px",
color: "#19844A",
margin: 0,
}}
>
({monthData.totalOverConsumptionCount}건 /
{monthData.totalConsumptionCount}건)
</p>
</>
) : (
<span
style={{
fontSize: "11px",
color: "#19844A",
marginTop: "20px",
marginBottom: "20px",
}}
>
과소비 내역이 없습니다!
</span>
)}
</>
) : (
<>
이번주 과소비 비율
<p
style={{
fontSize: "20px",
fontWeight: "bold",
}}
>
{weekData.overConsumptionRate ? (
<>
<span
style={{
fontSize: "20px",
fontFamily: "SUITExtraBold",
fontWeight: "bold",
color: "#19844A",
}}
>
{weekData.overConsumptionRate}
</span>{" "}
%
<p
style={{
marginBottom: "-30px",
marginLeft: "30%",
fontSize: "8px",
color: "#19844A",
margin: 0,
}}
>
({weekData.totalOverConsumptionCount}건 /
{weekData.totalConsumptionCount}건)
</p>
</>
) : (
<span style={{ fontSize: "12px", color: "#19844A" }}>
과소비 내역이 없습니다!
</span>
)}
</p>
{weekData.overConsumptionRate ? (
<>
<span
style={{
fontSize: "20px",
fontFamily: "SUITExtraBold",
fontWeight: "bold",
color: "#19844A",
}}
>
{weekData.overConsumptionRate}
</span>{" "}
%
<p
style={{
marginBottom: "-30px",
marginLeft: "30%",
fontSize: "8px",
color: "#19844A",
margin: 0,
}}
>
({weekData.totalOverConsumptionCount}건 /
{weekData.totalConsumptionCount}건)
</p>
</>
) : (
<span
style={{
fontSize: "11px",
color: "#19844A",
marginTop: "20px",
marginBottom: "20px",
}}
>
과소비 내역이 없습니다!
</span>
)}
</>
)}
</Box>
Expand Down Expand Up @@ -347,9 +352,9 @@ function WeekMonthStstisticsComponent({ weekData, monthData }) {
) : (
<span
style={{
fontSize: "12px",
fontSize: "11px",
color: "#19844A",
marginTop: "20px",
marginTop: "12px",
marginBottom: "20px",
}}
>
Expand Down Expand Up @@ -385,9 +390,9 @@ function WeekMonthStstisticsComponent({ weekData, monthData }) {
) : (
<span
style={{
fontSize: "12px",
fontSize: "11px",
color: "#19844A",
marginTop: "20px",
marginTop: "12px",
marginBottom: "20px",
}}
>
Expand Down
1 change: 1 addition & 0 deletions src/pages/Mob/MobCalenderPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const Box = styled.div`
background-color: white;
font-size: 12px;
box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.03);
padding: 15px;
`;
const HappyBox = styled.div`
width: 318px;
Expand Down
1 change: 1 addition & 0 deletions src/pages/Mob/MobMainPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const Box = styled.div`
background-color: white;
font-size: 12px;
box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.03);
padding: 15px;
`;

function MobMainPage() {
Expand Down

0 comments on commit b419549

Please sign in to comment.