Skip to content

Commit

Permalink
fix round closing modal
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPereira committed Dec 1, 2023
1 parent cc42717 commit 7a67a1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packages/nextjs/components/vaults-of-fortune/Vaults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ export const Vaults = () => {
>
{Number(vault.minimumROI) || 0}%
</span>{" "}
to <span className="text-green-500 font-cubano ml-1">{Number(vault.maximumROI) || 0}%</span>
<span className="text-xl">to</span>{" "}
<span className="text-green-500 font-cubano ml-1">{Number(vault.maximumROI) || 0}%</span>
</h6>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions packages/nextjs/pages/contest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useScaffoldEventSubscriber } from "~~/hooks/scaffold-eth";

const CurrentContest: NextPage = () => {
const [showRoundStartModal, setShowRoundStartModal] = useState(false);
const [showRoundClosingModal, setShowRoundClosingModal] = useState(false);
const [showRoundCalculating, setShowRoundCalculating] = useState(true);
const [isRoundEnd, setIsRoundEnd] = useState(false);
const [roundNumber, setRoundNumber] = useState(0);
const [roundResults, setRoundResults] = useState({
Expand All @@ -38,12 +38,12 @@ const CurrentContest: NextPage = () => {

useScaffoldEventSubscriber({
contractName: "Market",
eventName: "RoundClosing",
eventName: "RoundCalculating",
listener: logs => {
logs.map(log => {
const { roundNumber } = log.args;
setRoundNumber(Number(roundNumber));
setShowRoundClosingModal(true);
setShowRoundCalculating(true);
});
},
});
Expand Down Expand Up @@ -104,8 +104,8 @@ const CurrentContest: NextPage = () => {
</Modal>
)}

{showRoundClosingModal && (
<Modal isOpen={showRoundClosingModal} onClose={() => setShowRoundClosingModal(false)}>
{showRoundCalculating && (
<Modal isOpen={showRoundCalculating} onClose={() => setShowRoundCalculating(false)}>
<div className="h-[550px] flex flex-col justify-center">
<h3 className="font-cubano text-4xl text-center mb-10">Round Closing Soon</h3>
<div className="flex justify-center mb-5">
Expand Down

0 comments on commit 7a67a1e

Please sign in to comment.