bug fix
This commit is contained in:
parent
435d7d5ff9
commit
1c965f9d40
|
|
@ -211,14 +211,14 @@ export default function HeroSection() {
|
||||||
if (ready) {
|
if (ready) {
|
||||||
updateBets();
|
updateBets();
|
||||||
}
|
}
|
||||||
}, [ready, updateBets]);
|
}, [ready]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!ready) return;
|
if (!ready) return;
|
||||||
updateBets();
|
updateBets();
|
||||||
const interval = setInterval(updateBets, 3000);
|
const interval = setInterval(updateBets, 3000);
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, [ready, updateBets]);
|
}, [ready]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleMessage = (event: MessageEvent) => {
|
const handleMessage = (event: MessageEvent) => {
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ export default function YourGames({ bets }: GameModalProps) {
|
||||||
updateBets();
|
updateBets();
|
||||||
const interval = setInterval(updateBets, 10000);
|
const interval = setInterval(updateBets, 10000);
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, [bets, updateBets]);
|
}, [bets]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="py-16 px-6">
|
<section className="py-16 px-6">
|
||||||
|
|
|
||||||
|
|
@ -343,9 +343,10 @@ export default function PrivyButton() {
|
||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
onClick={customLogin}
|
onClick={customLogin}
|
||||||
className="bg-[rgb(248,144,22)] hover:bg-[rgb(248,200,100)] text-black font-bold px-6 py-3 rounded-md transition duration-300 hover:scale-115 w-30 mx-3"
|
disabled={!ready}
|
||||||
|
className={`bg-[rgb(248,144,22)] hover:bg-[rgb(248,200,100)] text-black font-bold px-6 py-3 rounded-md transition duration-300 hover:scale-115 w-30 mx-3 ${!ready ? 'opacity-50 cursor-not-allowed' : ''}`}
|
||||||
>
|
>
|
||||||
Sign In
|
{ready ? "Sign In" : "Loading..."}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export default function YourGames({bets}:GameModalProps) {
|
||||||
updateBets();
|
updateBets();
|
||||||
const interval = setInterval(updateBets, 10000);
|
const interval = setInterval(updateBets, 10000);
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, [bets, ready, updateBets]);
|
}, [bets, ready]);
|
||||||
|
|
||||||
// Handle bet closing
|
// Handle bet closing
|
||||||
const handleCloseBet = async () => {
|
const handleCloseBet = async () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user