diff --git a/packages/interface/src/components/BallotOverview.tsx b/packages/interface/src/components/BallotOverview.tsx index d4659a1f..c6c5ddae 100644 --- a/packages/interface/src/components/BallotOverview.tsx +++ b/packages/interface/src/components/BallotOverview.tsx @@ -1,4 +1,5 @@ import Link from "next/link"; +import { useRouter } from "next/router"; import { Heading } from "~/components/ui/Heading"; import { useBallot } from "~/contexts/Ballot"; @@ -10,6 +11,7 @@ import { VotingUsage } from "./VotingUsage"; export const BallotOverview = (): JSX.Element => { const { ballot } = useBallot(); + const { asPath } = useRouter(); const appState = useAppState(); @@ -23,7 +25,7 @@ export const BallotOverview = (): JSX.Element => { >
- My Ballot + {asPath.includes("ballot") ? "Summary" : "My Ballot"} diff --git a/packages/interface/src/components/VotingUsage.tsx b/packages/interface/src/components/VotingUsage.tsx index a5868fb9..94db2667 100644 --- a/packages/interface/src/components/VotingUsage.tsx +++ b/packages/interface/src/components/VotingUsage.tsx @@ -15,17 +15,13 @@ export const VotingUsage = (): JSX.Element => {

Voting Power

-

- {initialVoiceCredits} -

+
+ initialVoiceCredits && "text-red")}>{sum} -

Votes Left

-
+ of -
-

initialVoiceCredits && "text-red")}> - {sum} -

+ {initialVoiceCredits} +

Votes Used

diff --git a/packages/interface/src/contexts/Maci.tsx b/packages/interface/src/contexts/Maci.tsx index 1b642259..b64ef248 100644 --- a/packages/interface/src/contexts/Maci.tsx +++ b/packages/interface/src/contexts/Maci.tsx @@ -210,13 +210,15 @@ export const MaciProvider: React.FC = ({ children }: MaciProv }, [address, signatureMessage, signMessageAsync, setMaciPrivKey, setMaciPubKey, setSemaphoreIdentity]); // memo to calculate the voting end date - const votingEndsAt = useMemo( - () => - pollData && pollData.duration !== 0 - ? new Date(Number(pollData.deployTime) * 1000 + Number(pollData.duration) * 1000) - : config.resultsAt, - [pollData?.deployTime, pollData?.duration], - ); + // const votingEndsAt = useMemo( + // () => + // pollData && pollData.duration !== 0 + // ? new Date(Number(pollData.deployTime) * 1000 + Number(pollData.duration) * 1000) + // : config.resultsAt, + // [pollData?.deployTime, pollData?.duration], + // ); + + const votingEndsAt = new Date(1726556515000); // function to be used to signup to MACI const onSignup = useCallback( @@ -403,7 +405,7 @@ export const MaciProvider: React.FC = ({ children }: MaciProv return data; }) .then(async (data) => { - if (!data.isMerged || isAfter(votingEndsAt!, new Date())) { + if (!data.isMerged || isAfter(votingEndsAt, new Date())) { return undefined; } diff --git a/packages/interface/src/features/applications/components/ReviewBar.tsx b/packages/interface/src/features/applications/components/ReviewBar.tsx index 659739a8..7ba00d2f 100644 --- a/packages/interface/src/features/applications/components/ReviewBar.tsx +++ b/packages/interface/src/features/applications/components/ReviewBar.tsx @@ -65,7 +65,7 @@ export const ReviewBar = ({ projectId }: IReviewBarProps): JSX.Element => { This project is under review by our team. - Applications can be edited and approved until Registration period ends. + Applications can be edited and approved until Application period ends.
} status="default" diff --git a/packages/interface/src/features/ballot/components/BallotConfirmation.tsx b/packages/interface/src/features/ballot/components/BallotConfirmation.tsx index 48da5ed1..6620d8e6 100644 --- a/packages/interface/src/features/ballot/components/BallotConfirmation.tsx +++ b/packages/interface/src/features/ballot/components/BallotConfirmation.tsx @@ -36,7 +36,7 @@ export const BallotConfirmation = (): JSX.Element => { return (
- Your votes have been successfully submitted 🥳 + Your ballot has been successfully submitted 🥳

@@ -44,7 +44,7 @@ export const BallotConfirmation = (): JSX.Element => {

- Summary of your voting + Summary of your ballot

{`Round you voted in: ${config.roundId}`} diff --git a/packages/interface/src/features/projects/components/Projects.tsx b/packages/interface/src/features/projects/components/Projects.tsx index 3ab2e80a..d8af65d8 100644 --- a/packages/interface/src/features/projects/components/Projects.tsx +++ b/packages/interface/src/features/projects/components/Projects.tsx @@ -71,7 +71,7 @@ export const Projects = (): JSX.Element => { content={

- Voting is disabled until the Registration period ends. + Voting is disabled until the Application period ends.
} status="default" diff --git a/packages/interface/src/pages/applications/confirmation.tsx b/packages/interface/src/pages/applications/confirmation.tsx index b73638a6..7c9817fc 100644 --- a/packages/interface/src/pages/applications/confirmation.tsx +++ b/packages/interface/src/pages/applications/confirmation.tsx @@ -35,7 +35,7 @@ const ConfirmProjectPage = (): JSX.Element => {

- Applications can be edited and approved until the Registration period ends. + Applications can be edited and approved until the Application period ends.

{state !== EAppState.APPLICATION && } diff --git a/packages/interface/src/pages/applications/new.tsx b/packages/interface/src/pages/applications/new.tsx index 60bf09a2..bf41121f 100644 --- a/packages/interface/src/pages/applications/new.tsx +++ b/packages/interface/src/pages/applications/new.tsx @@ -31,7 +31,7 @@ const NewProjectPage = (): JSX.Element => {

- Applications can be edited and approved until the Registration period ends. + Applications can be edited and approved until the Application period ends.

{state !== EAppState.APPLICATION ? ( diff --git a/packages/interface/src/pages/ballot/index.tsx b/packages/interface/src/pages/ballot/index.tsx index eabc494b..9957677c 100644 --- a/packages/interface/src/pages/ballot/index.tsx +++ b/packages/interface/src/pages/ballot/index.tsx @@ -65,11 +65,11 @@ const EmptyBallot = (): JSX.Element => (
- Your vote is empty + Your ballot is empty

- Your vote currently doesn't have any projects added. Browse through the available projects. + There are currently no projects added. Browse through the available projects.