diff --git a/src/features/checker/components/ProjectReviewList/ProjectReviewList.tsx b/src/features/checker/components/ProjectReviewList/ProjectReviewList.tsx index f856053..fb23021 100644 --- a/src/features/checker/components/ProjectReviewList/ProjectReviewList.tsx +++ b/src/features/checker/components/ProjectReviewList/ProjectReviewList.tsx @@ -68,9 +68,9 @@ export const ProjectReviewList = ({ width: "0.9fr", render: (item) => { // addressFrom(1) === ai evaluator return item.reviews.some(review => review.reviewer === addressFrom(1)) ? ( - - ) : ( + ) : ( + ); }, }, diff --git a/src/features/checker/components/ProjectReviewList/mocks.tsx b/src/features/checker/components/ProjectReviewList/mocks.tsx index f3bc227..d81d9ca 100644 --- a/src/features/checker/components/ProjectReviewList/mocks.tsx +++ b/src/features/checker/components/ProjectReviewList/mocks.tsx @@ -1,3 +1,4 @@ +import { addressFrom } from "@/lib"; import { ProjectReview } from "../../types"; export const mockPendingReview0: ProjectReview[] = [ @@ -37,11 +38,11 @@ export const mockReadyToSubmit0: ProjectReview[] = [ date: new Date(2024, 5, 3, 15, 0, 0), avatarUrl: "", reviews: [ - { approved: true, reviewer: "0xJohnDoe" }, + { approved: true, reviewer: addressFrom(1) }, { approved: false, reviewer: "0xJaneDoe" }, { approved: true, reviewer: "0xJoneDoe" }, ], - aiSuggestion: 72, + aiSuggestion: 0, scoreAverage: 88, }, { diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 48f3aae..9ea856d 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,6 +1,7 @@ import { clsx, type ClassValue } from "clsx"; import { twMerge } from "tailwind-merge"; import { match, P } from "ts-pattern"; +import { Hex } from "viem"; export function cn(...inputs: ClassValue[]) { @@ -56,7 +57,7 @@ export function capitalizeWord(word: string): string { return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(); } -export const addressFrom = (index: number): string => { +export const addressFrom = (index: number): Hex => { const address = index.toString(16).padStart(40, "0"); return `0x${address}`; }; \ No newline at end of file