From 62ffbadca0669ea909c9dde78eb1406fd7efe809 Mon Sep 17 00:00:00 2001 From: "DESKTOP-APEQLA2\\NOSEL" Date: Fri, 21 Jun 2024 11:56:31 +0700 Subject: [PATCH] update --- src/app/get-aura/deposit.tsx | 94 ++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/src/app/get-aura/deposit.tsx b/src/app/get-aura/deposit.tsx index 541e315..1248914 100644 --- a/src/app/get-aura/deposit.tsx +++ b/src/app/get-aura/deposit.tsx @@ -18,7 +18,7 @@ import { useForm, Controller } from "react-hook-form"; import axios, { AxiosRequestConfig, AxiosResponse } from "axios"; import { useEffect, useState } from "react"; import { toast } from "react-toastify"; -import { redirect } from 'next/navigation' +import { redirect } from "next/navigation"; interface TableItemProps { txTime: string; @@ -50,7 +50,8 @@ function Deposit() { formState: { errors }, } = useForm(); - const { address, isConnected } = useAccount(); + const { address, isConnected, isConnecting, isDisconnected, isReconnecting } = + useAccount(); // const test = "0x7c698F755Cf38b71dEef73B77E0F1438EecA99F2"; const balance = useBalance({ address: address, @@ -131,57 +132,58 @@ function Deposit() { } }, [address]); - if (!isConnected) { - redirect('/get-aura'); + if (isDisconnected) { + redirect("/get-aura"); } return (
-
-
- Let’s deposit some AURA to your desired CEX below: -
-
-
{ - setTutType("bingx"); - }} - > - bingx -
-
{ - setTutType("gateio"); - }} - > - gate.io + {!isConnected && ( +
+
+ Let’s deposit some AURA to your desired CEX below:
-
{ - setTutType("mexc"); - }} - > - mexc +
+
{ + setTutType("bingx"); + }} + > + bingx +
+
{ + setTutType("gateio"); + }} + > + gate.io +
+
{ + setTutType("mexc"); + }} + > + mexc +
-
- - {tutType != "" && ( + )} + {tutType != "" && isConnected && (
{tutType === "bingx" && (