Skip to content

Commit

Permalink
removed multiround
Browse files Browse the repository at this point in the history
  • Loading branch information
Crisgarner authored and ctrlc03 committed Nov 7, 2024
1 parent a641915 commit d3c2de3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
16 changes: 13 additions & 3 deletions packages/interface/src/components/JoinButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export const JoinButton = (): JSX.Element => {
if (!isEligibleToVote && gatekeeperTrait === GatekeeperTrait.Zupass) {
return (
<div>
<Button variant={isRegistered === undefined || isLoading ? "disabled" : "primary"} onClick={handleZupassVerify}>
<Button
className="mb-4 sm:mb-0"
variant={isRegistered === undefined || isLoading ? "disabled" : "primary"}
onClick={handleZupassVerify}
>
Prove you can join with Zupass
</Button>
</div>
Expand All @@ -68,7 +72,11 @@ export const JoinButton = (): JSX.Element => {
if (isEligibleToVote && !isRegistered) {
return (
<div>
<Button variant={isRegistered === undefined || isLoading ? "disabled" : "primary"} onClick={handleSignup}>
<Button
className="mb-4 sm:mb-0"
variant={isRegistered === undefined || isLoading ? "disabled" : "primary"}
onClick={handleSignup}
>
Sign up to vote
</Button>
</div>
Expand All @@ -78,7 +86,9 @@ export const JoinButton = (): JSX.Element => {
if (!isEligibleToVote) {
return (
<div>
<Button variant="disabled">You are not allowed to vote</Button>
<Button className="mb-4 sm:mb-0" variant="disabled">
You are not allowed to vote
</Button>
</div>
);
}
Expand Down
27 changes: 15 additions & 12 deletions packages/interface/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import clsx from "clsx";
import Image from "next/image";
import { useAccount } from "wagmi";

import { JoinButton } from "~/components/JoinButton";
Expand All @@ -7,7 +9,6 @@ import { config } from "~/config";
import { useMaci } from "~/contexts/Maci";
import { useRound } from "~/contexts/Round";
import { FAQList } from "~/features/home/components/FaqList";
import { RoundsList } from "~/features/rounds/components/RoundsList";
import { useIsAdmin } from "~/hooks/useIsAdmin";
import { Layout } from "~/layouts/DefaultLayout";

Expand All @@ -32,21 +33,23 @@ const HomePage = (): JSX.Element => {

{isConnected && !isRegistered && <JoinButton />}

{isConnected && isAdmin && (
<div className="flex flex-col gap-4">
<p className="text-gray-400">Configure and deploy your contracts to get started.</p>

<Button size="auto" variant="primary">
<a href="/coordinator">Get Started</a>
</Button>
</div>
)}

{isConnected && !isAdmin && rounds && rounds.length === 0 && (
<p className="text-gray-400">There are no rounds deployed.</p>
)}

{rounds && rounds.length > 0 && <RoundsList />}
{isConnected && isRegistered && (
<Button className="mb-4 sm:mb-0" size="auto" variant="primary">
<a href="/rounds/0">Go to Projects Page</a>
</Button>
)}

<Image
alt="arrow-down"
className={clsx("absolute bottom-5 hidden sm:block dark:invert")}
height="24"
src="/arrow-down.svg"
width="24"
/>
</div>

<FAQList />
Expand Down

0 comments on commit d3c2de3

Please sign in to comment.