diff --git a/public/social.jpg b/public/social.jpg index f2813f8a..0ce40592 100644 Binary files a/public/social.jpg and b/public/social.jpg differ diff --git a/src/components/Layout/Footer/Footer.tsx b/src/components/Layout/Footer/Footer.tsx index 4e18273d..36a528fa 100644 --- a/src/components/Layout/Footer/Footer.tsx +++ b/src/components/Layout/Footer/Footer.tsx @@ -7,7 +7,6 @@ export const Footer = () => { Disclaimer diff --git a/src/pages/Dashboard/Dashboard.tsx b/src/pages/Dashboard/Dashboard.tsx index c6a08d25..b6e8afec 100644 --- a/src/pages/Dashboard/Dashboard.tsx +++ b/src/pages/Dashboard/Dashboard.tsx @@ -60,14 +60,14 @@ const WIDGETS: WidgetsType[] = [ title: 'Native auth', widget: NativeAuth, description: - 'A secure authentication token is used to interact with the backend', + 'A secure authentication token can be used to interact with the backend', reference: 'https://github.com/multiversx/mx-sdk-js-native-auth-server' }, { title: 'Batch Transactions', widget: BatchTransactions, description: - 'For complex scenarios transactions cand be sent in the desired group/sequence', + 'For complex scenarios transactions can be sent in the desired group/sequence', reference: 'https://github.com/multiversx/mx-sdk-dapp#sending-transactions-synchronously-in-batches' }, @@ -82,7 +82,7 @@ const WIDGETS: WidgetsType[] = [ title: 'Transactions (Ping & Pong)', widget: Transactions, props: { receiver: contractAddress }, - description: 'Filtered transactions for a given Smart Contract', + description: 'List transactions filtered for a given Smart Contract', reference: 'https://api.elrond.com/#/accounts/AccountController_getAccountTransactions' } diff --git a/src/pages/Dashboard/widgets/Account/components/Username.tsx b/src/pages/Dashboard/widgets/Account/components/Username.tsx index 42952834..562a6b18 100644 --- a/src/pages/Dashboard/widgets/Account/components/Username.tsx +++ b/src/pages/Dashboard/widgets/Account/components/Username.tsx @@ -1,8 +1,11 @@ import type { AccountType } from '@multiversx/sdk-dapp/types'; import { Label } from 'components/Label'; import { trimUsernameDomain } from 'helpers/sdkDappHelpers'; +import { ProfileType } from 'types'; -export const Username = (props: { account: AccountType }) => { +export const Username = (props: { + account: AccountType | ProfileType | null; +}) => { const { account } = props; if (!account) { diff --git a/src/pages/Dashboard/widgets/NativeAuth/NativeAuth.tsx b/src/pages/Dashboard/widgets/NativeAuth/NativeAuth.tsx index bd630dae..1ac50c13 100644 --- a/src/pages/Dashboard/widgets/NativeAuth/NativeAuth.tsx +++ b/src/pages/Dashboard/widgets/NativeAuth/NativeAuth.tsx @@ -3,9 +3,9 @@ import { Label } from 'components/Label'; import { MissingNativeAuthError } from 'components/MissingNativeAuthError'; import { OutputContainer } from 'components/OutputContainer'; import { FormatAmount } from 'components/sdkDappComponents'; -import { trimUsernameDomain } from 'helpers/sdkDappHelpers'; import { useGetLoginInfo, useGetNetworkConfig } from 'hooks'; import { useGetProfile } from './hooks'; +import { Username } from '../Account/components'; export const NativeAuth = () => { const { tokenLogin, isLoggedIn } = useGetLoginInfo(); @@ -35,27 +35,24 @@ export const NativeAuth = () => { return ( - {profile?.username && ( -

- {trimUsernameDomain(profile.username)} -

- )} - {profile?.address && ( -

- {profile.address} -

- )} - {profile?.balance && ( -
- - -
- )} +

+ {profile?.address ?? 'N/A'} +

+ + +

+ {profile?.shard ?? 'N/A'} +

+ +
+ + +
); }; diff --git a/src/pages/Dashboard/widgets/NativeAuth/hooks/useGetProfile.ts b/src/pages/Dashboard/widgets/NativeAuth/hooks/useGetProfile.ts index ac1f524b..ce982c69 100644 --- a/src/pages/Dashboard/widgets/NativeAuth/hooks/useGetProfile.ts +++ b/src/pages/Dashboard/widgets/NativeAuth/hooks/useGetProfile.ts @@ -1,14 +1,7 @@ import { useState } from 'react'; import axios from 'axios'; import { API_URL } from 'config'; - -type ProfileType = { - address: string; - username: string; - balance: string; - nonce: number; - shard: number; -}; +import { ProfileType } from 'types'; export const useGetProfile = () => { const [profile, setProfile] = useState(null); diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx index 4da7313f..fdce9a1a 100644 --- a/src/pages/Home/Home.tsx +++ b/src/pages/Home/Home.tsx @@ -9,12 +9,28 @@ export const Home = () => {
- Template dApp
- - The sdk-dapp starter project for any dApp{' '} +

Template dApp

+

+ The{' '} + + sdk-dapp + {' '} + starter project for any dApp{' '}
- built on the MultiversX blockchain. - + built on the{' '} + + MultiversX + {' '} + blockchain. +

diff --git a/src/pages/Home/Transaction/Transaction.tsx b/src/pages/Home/Transaction/Transaction.tsx index fa946e28..416dee0e 100644 --- a/src/pages/Home/Transaction/Transaction.tsx +++ b/src/pages/Home/Transaction/Transaction.tsx @@ -1,6 +1,7 @@ import { faPaperPlane } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { TRANSACTIONS_ENDPOINT } from '@multiversx/sdk-dapp/apiCalls/endpoints'; +import { Label } from 'components/Label'; import { ExplorerLink } from 'components/sdkDappComponents'; import { useGetNetworkConfig } from 'hooks'; import { getTransactionUrl, useTransactionOutcome } from './helpers'; @@ -16,17 +17,25 @@ export const Transaction = () => {
Send transaction - {txData.status &&

Transaction status: {txData.status}

} - {txData.address &&

Sender: {txData.address}

} + {txData.status && ( +

+ {txData.status} +

+ )} + {txData.address && ( +

+ {txData.address} +

+ )} {txData.txHash && (

- Hash:{' '} + { const { pathname } = useLocation(); return ( -

- +
+
+ -

Page not found

- {pathname} +
+

Page not found

+ {pathname} +
+
); }; diff --git a/src/pages/Unlock/Unlock.tsx b/src/pages/Unlock/Unlock.tsx index 7bede402..409e61ea 100644 --- a/src/pages/Unlock/Unlock.tsx +++ b/src/pages/Unlock/Unlock.tsx @@ -36,11 +36,18 @@ export const Unlock = () => { className='flex flex-col p-6 items-center justify-center gap-4 rounded-xl bg-[#f6f8fa]' data-testid='unlockPage' > -

Login

+
+

Login

-

Pick a login method

+

Choose a login method

+
+ + { data-testid='webWalletLoginBtn' {...commonProps} /> - -
diff --git a/src/types/index.ts b/src/types/index.ts index b5e4bb2b..f237351a 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1 +1,2 @@ export * from './sdkDappTypes'; +export * from './profile.types'; diff --git a/src/types/profile.types.ts b/src/types/profile.types.ts new file mode 100644 index 00000000..be303819 --- /dev/null +++ b/src/types/profile.types.ts @@ -0,0 +1,7 @@ +export type ProfileType = { + address: string; + username: string; + balance: string; + nonce: number; + shard: number; +};