diff --git a/apps/web-app/src/app/group/page.tsx b/apps/web-app/src/app/group/page.tsx index 91992f4..8207352 100644 --- a/apps/web-app/src/app/group/page.tsx +++ b/apps/web-app/src/app/group/page.tsx @@ -23,6 +23,8 @@ export default function GroupsPage() { } }, [_users, setLog]) + const users = useMemo(() => [..._users].reverse(), [_users]) + const joinGroup = useCallback(async () => { if (!_identity) { return @@ -130,7 +132,7 @@ export default function GroupsPage() { {_users.length > 0 && ( - {_users.map((user, i) => ( + {users.map((user, i) => ( {_identity?.commitment === user ? {user} : user} diff --git a/apps/web-app/src/app/proofs/page.tsx b/apps/web-app/src/app/proofs/page.tsx index fece86a..9b4e854 100644 --- a/apps/web-app/src/app/proofs/page.tsx +++ b/apps/web-app/src/app/proofs/page.tsx @@ -8,7 +8,7 @@ import { Box, Button, Divider, Heading, HStack, Link, Text, useBoolean, VStack } import { generateProof, Group } from "@semaphore-protocol/core" import { encodeBytes32String, ethers } from "ethers" import { useRouter } from "next/navigation" -import { useCallback, useEffect } from "react" +import { useCallback, useEffect, useMemo } from "react" import Feedback from "../../../contract-artifacts/Feedback.json" import useSemaphoreIdentity from "@/hooks/useSemaphoreIdentity" @@ -25,6 +25,8 @@ export default function ProofsPage() { } }, [_feedback, setLog]) + const feedback = useMemo(() => [..._feedback].reverse(), [_feedback]) + const sendFeedback = useCallback(async () => { if (!_identity) { return @@ -161,7 +163,7 @@ export default function ProofsPage() { {_feedback.length > 0 && ( - {_feedback.map((f, i) => ( + {feedback.map((f, i) => ( {f}