Skip to content

Commit 1371c5d

Browse files
committed
feat(validate_image): add validate image swipes count in stats group
1 parent 7385edf commit 1371c5d

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed
Lines changed: 13 additions & 0 deletions
Loading

community-dashboard/app/views/StatsBoard/index.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import InformationCard from '#components/InformationCard';
4343
import areaSvg from '#resources/icons/area.svg';
4444
import sceneSvg from '#resources/icons/scene.svg';
4545
import featureSvg from '#resources/icons/feature.svg';
46+
import validateImageSvg from '#resources/icons/validate-image.svg';
4647
import {
4748
ContributorTimeStatType,
4849
OrganizationSwipeStatsType,
@@ -467,6 +468,10 @@ function StatsBoard(props: Props) {
467468
(project) => project.projectType === FOOTPRINT,
468469
)?.totalSwipes;
469470

471+
const validateImageTotalSwipes = swipeByProjectType?.find(
472+
(project) => project.projectType === VALIDATE_IMAGE,
473+
)?.totalSwipes;
474+
470475
const organizationColors = scaleOrdinal<string, string | undefined>()
471476
.domain(totalSwipesByOrganizationStats?.map(
472477
(organization) => (organization.organizationName),
@@ -717,6 +722,29 @@ function StatsBoard(props: Props) {
717722
subHeading="Compare"
718723
variant="stat"
719724
/>
725+
<InformationCard
726+
icon={(
727+
<img
728+
src={validateImageSvg}
729+
alt="group icon"
730+
/>
731+
)}
732+
value={(
733+
<NumberOutput
734+
className={styles.numberOutput}
735+
value={validateImageTotalSwipes}
736+
normal
737+
invalidText={0}
738+
/>
739+
)}
740+
label={(
741+
<div className={styles.infoLabel}>
742+
Images Validated
743+
</div>
744+
)}
745+
subHeading="Validate Image"
746+
variant="stat"
747+
/>
720748
</div>
721749
<div className={styles.overallStatsContainer}>
722750
<InformationCard

community-dashboard/app/views/StatsBoard/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
>* {
6868
flex-basis: 0;
6969
flex-grow: 1;
70-
min-width: 12rem;
70+
min-width: 24rem;
7171

7272
@media (max-width: 48rem) {
7373
min-width: 100%;

0 commit comments

Comments
 (0)