Skip to content

Commit 2232d53

Browse files
committed
fixup! feat(validate_image): add validate image updates in community dashboard
1 parent 961f9d7 commit 2232d53

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,16 @@ function StatsBoard(props: Props) {
392392
const sortedProjectSwipeType = useMemo(
393393
() => (
394394
swipeByProjectType
395-
?.map((item) => ({
396-
...item,
397-
projectType: ((
398-
isDefined(item.projectType)
399-
&& isDefined(projectTypes[item.projectType])
400-
) ? item.projectType : UNKNOWN) as ProjectTypeEnum | '-1',
401-
}))
395+
?.map((item) => {
396+
const projectType: ProjectTypeEnum | '-1' = (
397+
isDefined(item.projectType) && isDefined(projectTypes[item.projectType])
398+
) ? item.projectType : UNKNOWN;
399+
400+
return ({
401+
...item,
402+
projectType,
403+
});
404+
})
402405
.sort((a, b) => compareNumber(a.totalSwipes, b.totalSwipes, -1)) ?? []
403406
),
404407
[swipeByProjectType],

django/apps/existing_database/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class Type(models.IntegerChoices):
6969
MEDIA = 5, "Media"
7070
DIGITIZATION = 6, "Digitization"
7171
STREET = 7, "Street"
72-
VALIDATE_IMAGE = 10, "Image Validate"
72+
VALIDATE_IMAGE = 10, "Validate Image"
7373

7474
project_id = models.CharField(primary_key=True, max_length=999)
7575
created = models.DateTimeField(blank=True, null=True)

0 commit comments

Comments
 (0)