diff --git a/frontend/src/app/(routes)/authz/page.tsx b/frontend/src/app/(routes)/authz/page.tsx index c6cda60e8..2c21bdb03 100644 --- a/frontend/src/app/(routes)/authz/page.tsx +++ b/frontend/src/app/(routes)/authz/page.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react'; const page = () => { return
authz
; diff --git a/frontend/src/app/(routes)/feegrant/page.tsx b/frontend/src/app/(routes)/feegrant/page.tsx index e1c5f9de4..9bc9f7f5d 100644 --- a/frontend/src/app/(routes)/feegrant/page.tsx +++ b/frontend/src/app/(routes)/feegrant/page.tsx @@ -1,7 +1,7 @@ -import React from 'react' +import React from 'react'; const page = () => { - return
Feegrant
-} + return
Feegrant
; +}; -export default page +export default page; diff --git a/frontend/src/app/(routes)/governance/page.tsx b/frontend/src/app/(routes)/governance/page.tsx index 045334572..bde72046e 100644 --- a/frontend/src/app/(routes)/governance/page.tsx +++ b/frontend/src/app/(routes)/governance/page.tsx @@ -1,11 +1,7 @@ -import React from 'react' +import React from 'react'; const page = () => { - return ( -
- governance -
- ) -} + return
governance
; +}; -export default page \ No newline at end of file +export default page; diff --git a/frontend/src/app/(routes)/groups/page.tsx b/frontend/src/app/(routes)/groups/page.tsx index 656238b12..bdb0cb9e5 100644 --- a/frontend/src/app/(routes)/groups/page.tsx +++ b/frontend/src/app/(routes)/groups/page.tsx @@ -1,7 +1,7 @@ -import React from 'react' +import React from 'react'; const page = () => { - return
Groups
-} + return
Groups
; +}; -export default page +export default page; diff --git a/frontend/src/app/(routes)/multisig/page.tsx b/frontend/src/app/(routes)/multisig/page.tsx index fec317160..af1aef9cf 100644 --- a/frontend/src/app/(routes)/multisig/page.tsx +++ b/frontend/src/app/(routes)/multisig/page.tsx @@ -1,7 +1,7 @@ -import React from 'react' +import React from 'react'; const page = () => { - return
Multisig
-} + return
Multisig
; +}; -export default page +export default page; diff --git a/frontend/src/app/(routes)/staking/page.tsx b/frontend/src/app/(routes)/staking/page.tsx index ac1fa01c3..6063a6fff 100644 --- a/frontend/src/app/(routes)/staking/page.tsx +++ b/frontend/src/app/(routes)/staking/page.tsx @@ -1,6 +1,6 @@ -import React from 'react' +import React from 'react'; const page = () => { - return
Staking
-} + return
Staking
; +}; -export default page +export default page; diff --git a/frontend/src/app/(routes)/transfers/page.tsx b/frontend/src/app/(routes)/transfers/page.tsx index 15e14288b..b4f73ca52 100644 --- a/frontend/src/app/(routes)/transfers/page.tsx +++ b/frontend/src/app/(routes)/transfers/page.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react'; const page = () => { return
transfers
; diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index bd25e6c6c..be0fceb0f 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -1,15 +1,15 @@ -import "./globals.css"; -import type { Metadata } from "next"; -import { Inter } from "next/font/google"; -import PermanentSideBar from "../components/PermanentSidebar"; -import { ConnectWalletButton } from "../components/ConnectWalletButton"; -import { StoreProvider } from "staking/store/StoreProvider"; +import './globals.css'; +import type { Metadata } from 'next'; +import { Inter } from 'next/font/google'; +import PermanentSideBar from '../components/PermanentSidebar'; +import { ConnectWalletButton } from '../components/ConnectWalletButton'; +import { StoreProvider } from 'staking/store/StoreProvider'; -const inter = Inter({ subsets: ["latin"] }); +const inter = Inter({ subsets: ['latin'] }); export const metadata: Metadata = { - title: "Resolute", - description: "resolute", + title: 'Resolute', + description: 'resolute', }; export default function RootLayout({ diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 773fbb348..8e0b97afe 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,6 +1,6 @@ -import React from 'react' +import React from 'react'; const OverviewPage = () => { - return
Overview
-} + return
Overview
; +}; -export default OverviewPage +export default OverviewPage; diff --git a/frontend/src/components/ConnectWalletButton.tsx b/frontend/src/components/ConnectWalletButton.tsx index 5fae52fc1..0a1815aab 100644 --- a/frontend/src/components/ConnectWalletButton.tsx +++ b/frontend/src/components/ConnectWalletButton.tsx @@ -1,27 +1,27 @@ -'use client' -import React, { useEffect, useState } from 'react' -import { networks } from '../utils/chainsInfo' -import Image from 'next/image' -import Walletpage from './popups/WalletPage' -import { getWalletName, isConnected } from '../utils/localStorage' -import { useDispatch, useSelector } from 'react-redux' -import { connectWalletV1 } from '../store/features/wallet/walletSlice' -import { AppDispatch, RootState } from '../store/store' +'use client'; +import React, { useEffect, useState } from 'react'; +import { networks } from '../utils/chainsInfo'; +import Image from 'next/image'; +import Walletpage from './popups/WalletPage'; +import { getWalletName, isConnected } from '../utils/localStorage'; +import { useDispatch, useSelector } from 'react-redux'; +import { connectWalletV1 } from '../store/features/wallet/walletSlice'; +import { AppDispatch, RootState } from '../store/store'; export const ConnectWalletButton = ({ children, }: { - children: React.ReactNode + children: React.ReactNode; }) => { - const dispatch = useDispatch() - const connected = useSelector((state: RootState) => state.wallet.connected) + const dispatch = useDispatch(); + const connected = useSelector((state: RootState) => state.wallet.connected); const [connectWalletDialogOpen, setConnectWalletDialogOpen] = - useState(false) + useState(false); const handleClose = () => { setConnectWalletDialogOpen( (connectWalletDialogOpen) => !connectWalletDialogOpen - ) - } + ); + }; const selectWallet = (walletName: string) => { dispatch( @@ -30,9 +30,9 @@ export const ConnectWalletButton = ({ mainnets: networks, testnets: [], }) - ) - handleClose() - } + ); + handleClose(); + }; const tryConnectWallet = (walletName: string) => { dispatch( @@ -41,34 +41,34 @@ export const ConnectWalletButton = ({ mainnets: networks, testnets: [], }) - ) - } + ); + }; useEffect(() => { - const walletName = getWalletName() - console.log(walletName) + const walletName = getWalletName(); + console.log(walletName); if (isConnected()) { - tryConnectWallet(walletName) + tryConnectWallet(walletName); } const accountChangeListener = () => { - setTimeout(() => tryConnectWallet(walletName), 1000) - window.location.reload() - } + setTimeout(() => tryConnectWallet(walletName), 1000); + window.location.reload(); + }; window.addEventListener( `${walletName}_keystorechange`, accountChangeListener - ) + ); return () => { window.removeEventListener( `${walletName}_keystorechange`, accountChangeListener - ) - } - }) + ); + }; + }); return connected ? ( <>{children} @@ -109,7 +109,7 @@ export const ConnectWalletButton = ({