diff --git a/src/components/DeadlineCountdown.tsx b/src/components/DeadlineCountdown.tsx index 32ab7c14..871b4162 100644 --- a/src/components/DeadlineCountdown.tsx +++ b/src/components/DeadlineCountdown.tsx @@ -5,7 +5,9 @@ import { useState, useEffect } from "react"; const DEADLINE_HOURS = 72; export function DeadlineCountdown({ lastPlotTime }: { lastPlotTime: string }) { - const [remaining, setRemaining] = useState(() => calcRemaining(lastPlotTime)); + const [remaining, setRemaining] = useState(() => + typeof window === "undefined" ? null : calcRemaining(lastPlotTime), + ); useEffect(() => { const interval = setInterval(() => { @@ -14,6 +16,16 @@ export function DeadlineCountdown({ lastPlotTime }: { lastPlotTime: string }) { return () => clearInterval(interval); }, [lastPlotTime]); + if (remaining === null) { + return ( +
+ Deadline: + --:--:-- + remaining +
+ ); + } + if (remaining <= 0) { return (
diff --git a/src/components/DonateWidget.tsx b/src/components/DonateWidget.tsx index 28475abd..247b8926 100644 --- a/src/components/DonateWidget.tsx +++ b/src/components/DonateWidget.tsx @@ -62,6 +62,7 @@ export function DonateWidget({ storylineId }: DonateWidgetProps) { abi: storyFactoryAbi, functionName: "donate", args: [BigInt(storylineId), parsedAmount], + gas: BigInt(150_000), }); setTxHash(hash); diff --git a/src/components/TradingWidget.tsx b/src/components/TradingWidget.tsx index 8a463a72..4d26b9a8 100644 --- a/src/components/TradingWidget.tsx +++ b/src/components/TradingWidget.tsx @@ -92,6 +92,7 @@ export function TradingWidget({ tokenAddress }: { tokenAddress: Address }) { abi: mcv2BondAbi, functionName: "mint", args: [tokenAddress, parsedAmount, maxCost, address], + gas: BigInt(2_000_000), }); setTxHash(hash); setTxState("pending"); @@ -125,6 +126,7 @@ export function TradingWidget({ tokenAddress }: { tokenAddress: Address }) { abi: mcv2BondAbi, functionName: "burn", args: [tokenAddress, parsedAmount, minRefund, address], + gas: BigInt(2_000_000), }); setTxHash(hash); setTxState("pending");