Skip to content

Commit

Permalink
[#123] bugfix: heatmap with no data
Browse files Browse the repository at this point in the history
  • Loading branch information
rosieyeon committed Feb 17, 2022
1 parent 1eca254 commit b85e349
Showing 1 changed file with 30 additions and 24 deletions.
54 changes: 30 additions & 24 deletions src/components/home/statistics/dailystats.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,33 +162,39 @@ export default function DailyStats(props) {
</div>
</div>
)}
<div className="daily-stats-graph">
<div className="daily-stats-graph__circular">
<div className="daily-stats-graph__circular-header">
공부휴식 비율
</div>
<div className="daily-stats-graph__circular-graph">
{useTotal && (
<CircularProgressBar
percentage={((dayTotal / useTotal) * 100).toFixed(1)}
/>
)}
</div>
</div>
<div className="daily-stats-graph__circular">
<div className="daily-stats-graph__circular-header">
오늘의 할 일 달성률
{!nodata && (
<div className="daily-stats-graph">
<div className="daily-stats-graph__circular">
<div className="daily-stats-graph__circular-header">
공부휴식 비율
</div>
<div className="daily-stats-graph__circular-graph">
{useTotal && (
<CircularProgressBar
percentage={((dayTotal / useTotal) * 100).toFixed(1)}
/>
)}
</div>
</div>
<div className="daily-stats-graph__circular-graph">
<CircularProgressBar
percentage={(
(todoCompleted.length / todos.length) *
100
).toFixed(1)}
/>
<div className="daily-stats-graph__circular">
<div className="daily-stats-graph__circular-header">
오늘의 할 일 달성률
</div>
<div className="daily-stats-graph__circular-graph">
{todos ? (
<CircularProgressBar
percentage={(
(todoCompleted.length / todos.length) *
100
).toFixed(1)}
/>
) : (
<CircularProgressBar percentage={0} />
)}
</div>
</div>
</div>
</div>
)}
</div>

{nodata && (
Expand Down

0 comments on commit b85e349

Please sign in to comment.