diff --git a/packages/interface/src/features/ballot/components/BallotConfirmation.tsx b/packages/interface/src/features/ballot/components/BallotConfirmation.tsx index 43e1b7b0..a6ab042d 100644 --- a/packages/interface/src/features/ballot/components/BallotConfirmation.tsx +++ b/packages/interface/src/features/ballot/components/BallotConfirmation.tsx @@ -57,109 +57,113 @@ export const BallotConfirmation = ({ pollId }: IBallotConfirmationProps): JSX.El const sum = useMemo(() => formatNumber(sumBallot(ballot.votes)), [ballot, sumBallot]); return ( -
- - Your ballot has been successfully submitted 🥳 - - -

- {`Thank you for participating in ${config.eventName} ${round?.roundId} round.`} -

+
+
+ + Your ballot has been successfully submitted 🥳 + + +

+ {`Thank you for participating in ${config.eventName} ${round?.roundId} round.`} +

-
- Summary of your ballot +
+ Summary of your ballot -

- {`Round you voted in: ${pollId}`} +

+ {`Round you voted in: ${pollId}`} -
+
- {`Number of projects you voted for: ${allocations.length} of ${projectCount?.count}`} -

+ {`Number of projects you voted for: ${allocations.length} of ${projectCount?.count}`} +

-
- {allocations.map((project) => ( -
- -
- ))} -
+
+ {allocations.map((project) => ( +
+ +
+ ))} +
-
-

Total votes allocated:

+
+

Total votes allocated:

-

{sum}

+

{sum}

+
-
- + + + {roundState === ERoundState.VOTING && ( + +
+ Changed your mind? + +

+ Your can edit your ballot and resubmit it anytime during the voting period. +

+
+ +
+ +
+
+ )} - {roundState === ERoundState.VOTING && (
- Changed your mind? + {`Help us improve our next round of ${config.eventName}`} -

Your can edit your ballot and resubmit it anytime during the voting period.

+

+ {`Your feedback will be influential to help us iterate on + ${config.eventName} process.`} +

-
- )} - - -
- {`Help us improve our next round of ${config.eventName}`} - -

- {`Your feedback will be influential to help us iterate on - ${config.eventName} process.`} -

-
- -
- -
-
- -
- Want to run a round? + +
+ Want to run a round? -

- Our code is open source so you can fork it and run a round anytime. If you need any assistance or want to - share with us your awesomeness, find us at #🗳️-maci channel in PSE Discord. -

-
+

+ Our code is open source so you can fork it and run a round anytime. If you need any assistance or want to + share with us your awesomeness, find us at #🗳️-maci channel in PSE Discord. +

+
-
- -
-
-
+
+ +
+ +
+ ); }; diff --git a/packages/interface/src/layouts/types.ts b/packages/interface/src/layouts/types.ts index 4c1373e1..383e0621 100644 --- a/packages/interface/src/layouts/types.ts +++ b/packages/interface/src/layouts/types.ts @@ -27,5 +27,5 @@ export interface ILayoutProps extends PropsWithChildren { export interface IAdminLayoutProps extends PropsWithChildren { sidebar?: "left" | "right"; sidebarComponent?: ReactNode; - roundId?: string; + pollId?: string; } diff --git a/packages/interface/src/pages/index.tsx b/packages/interface/src/pages/index.tsx index a2fc5826..d1a3b6f9 100644 --- a/packages/interface/src/pages/index.tsx +++ b/packages/interface/src/pages/index.tsx @@ -19,13 +19,13 @@ const HomePage = (): JSX.Element => { const { isRegistered } = useMaci(); const isAdmin = useIsAdmin(); const { rounds } = useRound(); - const singleRound = useMemo(() => rounds?.[0], [rounds]); + const singleRound = useMemo(() => (rounds && rounds.length === 1 ? rounds[0] : undefined), [rounds]); return ( - {singleRound && rounds!.length === 1 && } + {singleRound && } - {rounds && rounds.length > 1 && ( + {!singleRound && (
{config.eventName} @@ -51,11 +51,11 @@ const HomePage = (): JSX.Element => {
)} - {isConnected && !isAdmin && rounds.length === 0 && ( + {isConnected && !isAdmin && rounds && rounds.length === 0 && (

There are no rounds deployed.

)} - + {rounds && rounds.length > 1 && } )} diff --git a/packages/interface/src/pages/rounds/[pollId]/applications/confirmation.tsx b/packages/interface/src/pages/rounds/[pollId]/applications/confirmation.tsx index 2bba6372..49b932a7 100644 --- a/packages/interface/src/pages/rounds/[pollId]/applications/confirmation.tsx +++ b/packages/interface/src/pages/rounds/[pollId]/applications/confirmation.tsx @@ -41,7 +41,7 @@ const ConfirmProjectPage = ({ pollId }: { pollId: string }): JSX.Element => { if (project === undefined) { return ( - +
@@ -54,7 +54,7 @@ const ConfirmProjectPage = ({ pollId }: { pollId: string }): JSX.Element => { } return ( - +
{project.recipient.initialized === false ? ( diff --git a/packages/interface/src/pages/rounds/[pollId]/applications/index.tsx b/packages/interface/src/pages/rounds/[pollId]/applications/index.tsx index 75203d03..c9257e5f 100644 --- a/packages/interface/src/pages/rounds/[pollId]/applications/index.tsx +++ b/packages/interface/src/pages/rounds/[pollId]/applications/index.tsx @@ -8,7 +8,7 @@ interface IApplicationsPageProps { } const ApplicationsPage = ({ pollId }: IApplicationsPageProps): JSX.Element => ( - + ); diff --git a/packages/interface/src/pages/rounds/[pollId]/applications/new.tsx b/packages/interface/src/pages/rounds/[pollId]/applications/new.tsx index 9d68eb84..5cab7af5 100644 --- a/packages/interface/src/pages/rounds/[pollId]/applications/new.tsx +++ b/packages/interface/src/pages/rounds/[pollId]/applications/new.tsx @@ -18,7 +18,7 @@ const NewProjectPage = ({ pollId }: { pollId: string }): JSX.Element => { const state = useRoundState({ pollId }); return ( - +
diff --git a/packages/interface/src/pages/rounds/[pollId]/ballot/confirmation.tsx b/packages/interface/src/pages/rounds/[pollId]/ballot/confirmation.tsx index 715e8e0c..c79b546b 100644 --- a/packages/interface/src/pages/rounds/[pollId]/ballot/confirmation.tsx +++ b/packages/interface/src/pages/rounds/[pollId]/ballot/confirmation.tsx @@ -39,7 +39,9 @@ const BallotConfirmationPage = ({ pollId }: { pollId: string }): JSX.Element | n }, [manageDisplay]); return ( - {isLoading ? : } + + {isLoading ? : } + ); };