diff --git a/packages/interface/.env.example b/packages/interface/.env.example index b6405b2b..89be68ce 100644 --- a/packages/interface/.env.example +++ b/packages/interface/.env.example @@ -38,7 +38,6 @@ NEXT_PUBLIC_TOKEN_NAME="Votes" # Determine when users can register applications, admins review them, voters vote, and results are published NEXT_PUBLIC_START_DATE=2024-01-01T00:00:00.000Z NEXT_PUBLIC_REGISTRATION_END_DATE=2024-01-01T00:00:00.000Z -NEXT_PUBLIC_REVIEW_END_DATE=2024-01-01T00:00:00.000Z NEXT_PUBLIC_RESULTS_DATE=2024-01-01T00:00:00.000Z # Collect user feedback. Is shown as a link when user has voted diff --git a/packages/interface/src/components/BallotOverview.tsx b/packages/interface/src/components/BallotOverview.tsx index 02b75c9f..d4659a1f 100644 --- a/packages/interface/src/components/BallotOverview.tsx +++ b/packages/interface/src/components/BallotOverview.tsx @@ -1,5 +1,6 @@ import Link from "next/link"; +import { Heading } from "~/components/ui/Heading"; import { useBallot } from "~/contexts/Ballot"; import { useAppState } from "~/utils/state"; import { EAppState } from "~/utils/types"; @@ -21,7 +22,9 @@ export const BallotOverview = (): JSX.Element => { } >
-

My Ballot

+ + My Ballot + diff --git a/packages/interface/src/components/RoundInfo.tsx b/packages/interface/src/components/RoundInfo.tsx index 9b8e1d83..75c9f06f 100644 --- a/packages/interface/src/components/RoundInfo.tsx +++ b/packages/interface/src/components/RoundInfo.tsx @@ -1,5 +1,6 @@ import Image from "next/image"; +import { Heading } from "~/components/ui/Heading"; import { config } from "~/config"; export const RoundInfo = (): JSX.Element => ( @@ -9,7 +10,9 @@ export const RoundInfo = (): JSX.Element => (
{config.roundLogo && round logo} -

{config.roundId}

+ + {config.roundId} +
); diff --git a/packages/interface/src/components/ui/Form.tsx b/packages/interface/src/components/ui/Form.tsx index d7aa107f..133f72eb 100644 --- a/packages/interface/src/components/ui/Form.tsx +++ b/packages/interface/src/components/ui/Form.tsx @@ -24,6 +24,7 @@ import { type z } from "zod"; import { cn } from "~/utils/classNames"; import { IconButton } from "./Button"; +import { Heading } from "./Heading"; import { inputBase, Input, InputWrapper, InputIcon } from "./Input"; import { Tooltip } from "./Tooltip"; @@ -197,7 +198,7 @@ export const FormSection = ({ ...props }: { title: string; description: string } & ComponentProps<"section">): JSX.Element => (
-

{title}

+ {title}

{description}

diff --git a/packages/interface/src/components/ui/Heading.tsx b/packages/interface/src/components/ui/Heading.tsx index 97f77d93..3854cf49 100644 --- a/packages/interface/src/components/ui/Heading.tsx +++ b/packages/interface/src/components/ui/Heading.tsx @@ -5,14 +5,16 @@ import { createComponent } from "."; export const Heading = createComponent( "div", tv({ - base: "font-bold", + base: "font-bold dark:text-white font-mono uppercase", variants: { size: { md: "text-base", lg: "text-lg mt-2 mb-1 ", xl: "text-xl ", "2xl": "text-2xl mt-8 mb-4 ", - "3xl": "text-3xl mt-8 mb-4 ", + "3xl": "text-[32px]", + "4xl": "text-[40px]", + "6xl": "text-6xl mb-8", }, }, defaultVariants: { diff --git a/packages/interface/src/config.ts b/packages/interface/src/config.ts index 1dfabe7e..f6ce60c6 100644 --- a/packages/interface/src/config.ts +++ b/packages/interface/src/config.ts @@ -76,7 +76,6 @@ export const config = { voteLimit: 50, startsAt: parseDate(process.env.NEXT_PUBLIC_START_DATE), registrationEndsAt: parseDate(process.env.NEXT_PUBLIC_REGISTRATION_END_DATE), - reviewEndsAt: parseDate(process.env.NEXT_PUBLIC_REVIEW_END_DATE), resultsAt: parseDate(process.env.NEXT_PUBLIC_RESULTS_DATE), skipApprovedVoterCheck: ["true", "1"].includes(process.env.NEXT_PUBLIC_SKIP_APPROVED_VOTER_CHECK!), tokenName: process.env.NEXT_PUBLIC_TOKEN_NAME!, diff --git a/packages/interface/src/features/applications/components/ApplicationsToApprove.tsx b/packages/interface/src/features/applications/components/ApplicationsToApprove.tsx index f4ee73ca..ef59294e 100644 --- a/packages/interface/src/features/applications/components/ApplicationsToApprove.tsx +++ b/packages/interface/src/features/applications/components/ApplicationsToApprove.tsx @@ -9,6 +9,7 @@ import { EmptyState } from "~/components/EmptyState"; import { Badge } from "~/components/ui/Badge"; import { Button } from "~/components/ui/Button"; import { Checkbox, Form } from "~/components/ui/Form"; +import { Heading } from "~/components/ui/Heading"; import { Skeleton } from "~/components/ui/Skeleton"; import { Spinner } from "~/components/ui/Spinner"; import { useApplications } from "~/features/applications/hooks/useApplications"; @@ -183,7 +184,9 @@ export const ApplicationsToApprove = (): JSX.Element => { return (
-

Review Applications

+ + Review Applications +

Select the applications you want to approve. You must be a configured admin to approve applications. diff --git a/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx b/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx index 36acb7f2..8ff1e65a 100644 --- a/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx +++ b/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx @@ -2,6 +2,7 @@ import clsx from "clsx"; import { useMemo, type ReactNode } from "react"; import { useFormContext } from "react-hook-form"; +import { Heading } from "~/components/ui/Heading"; import { Tag } from "~/components/ui/Tag"; import type { Application } from "../types"; @@ -42,7 +43,7 @@ export const ReviewApplicationDetails = (): JSX.Element => { return (

-

Review & Submit

+ Review & Submit

Please review and submit your project application.

diff --git a/packages/interface/src/features/ballot/components/BallotConfirmation.tsx b/packages/interface/src/features/ballot/components/BallotConfirmation.tsx index 30fab927..a2134d86 100644 --- a/packages/interface/src/features/ballot/components/BallotConfirmation.tsx +++ b/packages/interface/src/features/ballot/components/BallotConfirmation.tsx @@ -5,6 +5,7 @@ import { tv } from "tailwind-variants"; import { createComponent } from "~/components/ui"; import { Button } from "~/components/ui/Button"; +import { Heading } from "~/components/ui/Heading"; import { Notice } from "~/components/ui/Notice"; import { config } from "~/config"; import { useBallot } from "~/contexts/Ballot"; @@ -34,7 +35,9 @@ export const BallotConfirmation = (): JSX.Element => { return (
-

Your votes have been successfully submitted 🥳

+ + Your votes have been successfully submitted 🥳 +

{`Thank you for participating in ${config.eventName} ${config.roundId} round.`} diff --git a/packages/interface/src/features/projects/components/ProjectDetails.tsx b/packages/interface/src/features/projects/components/ProjectDetails.tsx index 6a2c7f16..e696066e 100644 --- a/packages/interface/src/features/projects/components/ProjectDetails.tsx +++ b/packages/interface/src/features/projects/components/ProjectDetails.tsx @@ -1,6 +1,7 @@ import clsx from "clsx"; import { type ReactNode } from "react"; +import { Heading } from "~/components/ui/Heading"; import { Navigation } from "~/components/ui/Navigation"; import { ProjectAvatar } from "~/features/projects/components/ProjectAvatar"; import { ProjectBanner } from "~/features/projects/components/ProjectBanner"; @@ -50,7 +51,9 @@ const ProjectDetails = ({

-

{attestation?.name}

+ + {attestation?.name} + {appState === EAppState.VOTING && }
diff --git a/packages/interface/src/features/projects/components/Projects.tsx b/packages/interface/src/features/projects/components/Projects.tsx index 1ad974cd..2c07eb5a 100644 --- a/packages/interface/src/features/projects/components/Projects.tsx +++ b/packages/interface/src/features/projects/components/Projects.tsx @@ -6,6 +6,7 @@ import { FiAlertCircle } from "react-icons/fi"; import { InfiniteLoading } from "~/components/InfiniteLoading"; import { SortFilter } from "~/components/SortFilter"; import { StatusBar } from "~/components/StatusBar"; +import { Heading } from "~/components/ui/Heading"; import { useBallot } from "~/contexts/Ballot"; import { useMaci } from "~/contexts/Maci"; import { useResults } from "~/hooks/useResults"; @@ -78,7 +79,9 @@ export const Projects = (): JSX.Element => { )}
-

Projects

+ + Projects +
diff --git a/packages/interface/src/features/signup/components/FaqList.tsx b/packages/interface/src/features/signup/components/FaqList.tsx index abe9c44f..20c04510 100644 --- a/packages/interface/src/features/signup/components/FaqList.tsx +++ b/packages/interface/src/features/signup/components/FaqList.tsx @@ -1,8 +1,10 @@ +import { Heading } from "~/components/ui/Heading"; + import { FAQItem } from "./FaqItem"; export const FAQList = (): JSX.Element => (
-

FAQ

+ FAQ { return Add voters to allow them to vote; } return ( -
+
{(data ? data.filter( ({ recipient }, index, array) => array.findIndex((item) => item.recipient === recipient) === index, diff --git a/packages/interface/src/pages/applications/confirmation.tsx b/packages/interface/src/pages/applications/confirmation.tsx index ba4d8e7b..b73638a6 100644 --- a/packages/interface/src/pages/applications/confirmation.tsx +++ b/packages/interface/src/pages/applications/confirmation.tsx @@ -4,6 +4,7 @@ import { useMemo } from "react"; import { FiAlertCircle } from "react-icons/fi"; import { Alert } from "~/components/ui/Alert"; +import { Heading } from "~/components/ui/Heading"; import { useApplicationByTxHash } from "~/features/applications/hooks/useApplicationByTxHash"; import { ProjectItem } from "~/features/projects/components/ProjectItem"; import { Layout } from "~/layouts/DefaultLayout"; @@ -23,7 +24,9 @@ const ConfirmProjectPage = (): JSX.Element => {
-

Your project application has been submitted!

+ + Your project application has been submitted! +

Thank you for submitting your project application. Our team is now reviewing it. diff --git a/packages/interface/src/pages/applications/new.tsx b/packages/interface/src/pages/applications/new.tsx index 344c4b62..60bf09a2 100644 --- a/packages/interface/src/pages/applications/new.tsx +++ b/packages/interface/src/pages/applications/new.tsx @@ -1,6 +1,7 @@ import { FiAlertCircle } from "react-icons/fi"; import { Alert } from "~/components/ui/Alert"; +import { Heading } from "~/components/ui/Heading"; import { ApplicationForm } from "~/features/applications/components/ApplicationForm"; import { Layout } from "~/layouts/DefaultLayout"; import { useAppState } from "~/utils/state"; @@ -13,7 +14,9 @@ const NewProjectPage = (): JSX.Element => {

-

New Application

+ + New Application +

diff --git a/packages/interface/src/pages/ballot/index.tsx b/packages/interface/src/pages/ballot/index.tsx index 070d14d2..1ed60f17 100644 --- a/packages/interface/src/pages/ballot/index.tsx +++ b/packages/interface/src/pages/ballot/index.tsx @@ -8,6 +8,7 @@ import { useAccount } from "wagmi"; import { Button } from "~/components/ui/Button"; import { Dialog } from "~/components/ui/Dialog"; import { Form } from "~/components/ui/Form"; +import { Heading } from "~/components/ui/Heading"; import { useBallot } from "~/contexts/Ballot"; import { useMaci } from "~/contexts/Maci"; import { AllocationFormWrapper } from "~/features/ballot/components/AllocationList"; @@ -63,7 +64,9 @@ const ClearBallot = (): JSX.Element | null => { const EmptyBallot = (): JSX.Element => (

-

Your vote is empty

+ + Your vote is empty +

Your vote currently doesn't have any projects added. Browse through the available projects. @@ -87,7 +90,9 @@ const BallotAllocationForm = (): JSX.Element => { return (

-

My Ballot

+ + My Ballot +

Once you have reviewed your vote allocation, you can submit your ballot.

@@ -142,7 +147,9 @@ const BallotPage = (): JSX.Element => { )} - {appState !== EAppState.VOTING &&
You can only vote during the voting period.
} + {appState !== EAppState.VOTING && ( +
You can only vote during the voting period.
+ )} ); }; diff --git a/packages/interface/src/pages/info/index.tsx b/packages/interface/src/pages/info/index.tsx index 745bdceb..434a1b8c 100644 --- a/packages/interface/src/pages/info/index.tsx +++ b/packages/interface/src/pages/info/index.tsx @@ -1,3 +1,4 @@ +import { Heading } from "~/components/ui/Heading"; import { config } from "~/config"; import { Layout } from "~/layouts/DefaultLayout"; import { cn } from "~/utils/classNames"; @@ -8,13 +9,9 @@ const steps = [ label: "Registration", date: config.startsAt, }, - { - label: "Review & Approval", - date: config.registrationEndsAt, - }, { label: "Voting", - date: config.reviewEndsAt, + date: config.registrationEndsAt, }, { label: "Tallying", @@ -43,7 +40,9 @@ const InfoPage = (): JSX.Element => { "opacity-50": currentStepIndex <= i, })} > -

{step.label}

+ + {step.label} + {step.date instanceof Date && !Number.isNaN(step.date) &&
{formatDate(step.date)}
}
diff --git a/packages/interface/src/pages/signup/index.tsx b/packages/interface/src/pages/signup/index.tsx index b2d7f4bc..adb346cb 100644 --- a/packages/interface/src/pages/signup/index.tsx +++ b/packages/interface/src/pages/signup/index.tsx @@ -7,6 +7,7 @@ import { EligibilityDialog } from "~/components/EligibilityDialog"; import { Info } from "~/components/Info"; import { JoinButton } from "~/components/JoinButton"; import { Button } from "~/components/ui/Button"; +import { Heading } from "~/components/ui/Heading"; import { config } from "~/config"; import { useMaci } from "~/contexts/Maci"; import { FAQList } from "~/features/signup/components/FaqList"; @@ -24,9 +25,13 @@ const SignupPage = (): JSX.Element => {
-

{config.eventName.toUpperCase()}

+ + {config.eventName} + -

{config.roundId.toUpperCase()}

+ + {config.roundId.toUpperCase()} +

{config.startsAt && format(config.startsAt, "d MMMM, yyyy")} diff --git a/packages/interface/src/pages/stats/index.tsx b/packages/interface/src/pages/stats/index.tsx index b7b0ab89..f28e9274 100644 --- a/packages/interface/src/pages/stats/index.tsx +++ b/packages/interface/src/pages/stats/index.tsx @@ -18,7 +18,9 @@ const ResultsChart = dynamic(async () => import("~/features/results/components/C const Stat = ({ title, children = null }: PropsWithChildren<{ title: string }>) => (

-

{title}

+ + {title} +
{children}
@@ -51,7 +53,7 @@ const Stats = () => { if (!pollData && !isConnected) { return ( -

Connect your wallet to see results

+ Connect your wallet to see results
@@ -66,7 +68,7 @@ const Stats = () => { return (
-

Top Projects

+ Top Projects
diff --git a/packages/interface/src/styles/globals.css b/packages/interface/src/styles/globals.css index 4fd1a774..e4a35015 100644 --- a/packages/interface/src/styles/globals.css +++ b/packages/interface/src/styles/globals.css @@ -55,9 +55,3 @@ color: #888888; } } - -@media (prefers-color-scheme: "dark") { - h3 { - color: white; - } -} diff --git a/packages/interface/src/utils/state.ts b/packages/interface/src/utils/state.ts index 8561c5e6..68d3cd51 100644 --- a/packages/interface/src/utils/state.ts +++ b/packages/interface/src/utils/state.ts @@ -17,10 +17,6 @@ export const useAppState = (): EAppState => { return EAppState.APPLICATION; } - if (config.reviewEndsAt && isAfter(config.reviewEndsAt, now)) { - return EAppState.REVIEWING; - } - if (isAfter(votingEndsAt, now)) { return EAppState.VOTING; } diff --git a/packages/interface/src/utils/types.ts b/packages/interface/src/utils/types.ts index 45935ea6..02b8cf0a 100644 --- a/packages/interface/src/utils/types.ts +++ b/packages/interface/src/utils/types.ts @@ -2,7 +2,6 @@ import { type Address } from "viem"; export enum EAppState { LOADING = "LOADING", - REVIEWING = "REVIEWING", APPLICATION = "APPLICATION", VOTING = "VOTING", TALLYING = "TALLYING",