|
|
@ -16,6 +16,7 @@ type ProgressStackProps = { |
|
|
|
})[]; |
|
|
|
})[]; |
|
|
|
accountStreak?: StreakResponse; |
|
|
|
accountStreak?: StreakResponse; |
|
|
|
isLoading: boolean; |
|
|
|
isLoading: boolean; |
|
|
|
|
|
|
|
topicDoneToday: number; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const MAX_PROGRESS_TO_SHOW = 5; |
|
|
|
const MAX_PROGRESS_TO_SHOW = 5; |
|
|
@ -23,7 +24,8 @@ const MAX_PROJECTS_TO_SHOW = 8; |
|
|
|
const MAX_BOOKMARKS_TO_SHOW = 8; |
|
|
|
const MAX_BOOKMARKS_TO_SHOW = 8; |
|
|
|
|
|
|
|
|
|
|
|
export function ProgressStack(props: ProgressStackProps) { |
|
|
|
export function ProgressStack(props: ProgressStackProps) { |
|
|
|
const { progresses, projects, isLoading, accountStreak } = props; |
|
|
|
const { progresses, projects, isLoading, accountStreak, topicDoneToday } = |
|
|
|
|
|
|
|
props; |
|
|
|
|
|
|
|
|
|
|
|
const bookmarkedProgresses = progresses.filter( |
|
|
|
const bookmarkedProgresses = progresses.filter( |
|
|
|
(progress) => |
|
|
|
(progress) => |
|
|
@ -62,6 +64,11 @@ export function ProgressStack(props: ProgressStackProps) { |
|
|
|
value={accountStreak?.count || 0} |
|
|
|
value={accountStreak?.count || 0} |
|
|
|
isLoading={isLoading} |
|
|
|
isLoading={isLoading} |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
<StatsCard |
|
|
|
|
|
|
|
title="Topics Done Today" |
|
|
|
|
|
|
|
value={topicDoneToday} |
|
|
|
|
|
|
|
isLoading={isLoading} |
|
|
|
|
|
|
|
/> |
|
|
|
<StatsCard |
|
|
|
<StatsCard |
|
|
|
title="Projects Finished" |
|
|
|
title="Projects Finished" |
|
|
|
value={totalProjectFinished} |
|
|
|
value={totalProjectFinished} |
|
|
|