Skip to content

Commit

Permalink
Show max projects on the UI only when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
sembrestels committed Sep 24, 2024
1 parent 99ad803 commit af4c467
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions apps/web/src/components/VotingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ const VotingCard = ({
<>
<div className="flex justify-between">
<h4 className="h-12 text-xl mb-6 text-accent">
Cast Your Vote ({votedProjects.length} / {maxVotedProjects}{" "}
projects)
Cast Your Vote{" "}
{projects.length > maxVotedProjects
? `(${votedProjects.length} / ${maxVotedProjects} projects)`
: ""}
</h4>
<div className="text-sm mt-2">
Used {totalVotes} / {votingPower}
Expand Down
5 changes: 2 additions & 3 deletions apps/web/src/utils/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import "@rainbow-me/rainbowkit/styles.css";
import { getDefaultConfig } from "@rainbow-me/rainbowkit";
import { createPublicClient } from "viem";
import { http, createConfig } from "wagmi";
import { mainnet } from "wagmi/chains";
import { base, mainnet, optimism } from "wagmi/chains";
import { SITE_NAME } from "../../../../constants";

import * as chains from "wagmi/chains";
import { NETWORK } from "../../../../constants";
const chain = chains[NETWORK];
const chain = NETWORK === "optimism" ? optimism : base;

export const WALLETCONNECT_PROJECT_ID =
process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID ?? "";
Expand Down

0 comments on commit af4c467

Please sign in to comment.