File tree Expand file tree Collapse file tree 5 files changed +16
-160
lines changed
Expand file tree Collapse file tree 5 files changed +16
-160
lines changed Original file line number Diff line number Diff line change 11{
2- "extends" : [" next/core-web-vitals" , " next/typescript" ]
2+ "extends" : [" next/core-web-vitals" , " next/typescript" ],
3+ "rules" : {
4+ "@typescript-eslint/no-explicit-any" : " off" ,
5+ "@typescript-eslint/no-unused-vars" : " off" ,
6+ "react/no-unescaped-entities" : " off"
7+ }
38}
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import { config } from "@/utils/config";
1111
1212export default function TokenActionsPage ( ) {
1313 const { address } = useAccount ( ) ;
14- const searchParams = useSearchParams ( ) ;
1514
1615 const [ contractAddress , setContractAddress ] = useState < `0x${string } `> ( "0x0" ) ;
1716 const [ chainId , setChainId ] = useState < number > ( 0 ) ;
@@ -27,13 +26,17 @@ export default function TokenActionsPage() {
2726
2827 // Get contract address and chainId from URL parameters (using either "tnt" or "vault")
2928 useEffect ( ( ) => {
30- const tnt = searchParams . get ( "tnt" ) || searchParams . get ( "vault" ) ;
31- const chain = searchParams . get ( "chainId" ) ;
32- if ( tnt && chain ) {
33- setContractAddress ( tnt as `0x${string } `) ;
34- setChainId ( Number ( chain ) ) ;
29+ if ( typeof window !== 'undefined' ) {
30+ const params = new URLSearchParams ( window . location . search ) ;
31+ const tnt = params . get ( 'tnt' ) || params . get ( 'vault' ) ;
32+ const chain = params . get ( 'chainId' ) ;
33+
34+ if ( tnt && chain ) {
35+ setContractAddress ( tnt as `0x${string } `) ;
36+ setChainId ( Number ( chain ) ) ;
37+ }
3538 }
36- } , [ searchParams ] ) ;
39+ } , [ ] ) ;
3740
3841 const handleIssueToken = async ( e : React . FormEvent ) => {
3942 e . preventDefault ( ) ;
Original file line number Diff line number Diff line change 11"use client" ;
22
33import React from "react" ;
4- import { useWallet } from "@/hooks/WalletConnectProvider" ;
54import Image from "next/image" ;
65import { useAccount } from "wagmi" ;
76
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments