Skip to content

Commit 6d5950f

Browse files
committed
Replace account related Box elements
1 parent d0641b7 commit 6d5950f

6 files changed

Lines changed: 15 additions & 21 deletions

File tree

src/app/components/Account/AccountMetadataSourceIndicator.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { FC } from 'react'
22
import { AccountMetadataSource } from '../../data/named-accounts'
33
import { exhaustedTypeWarning } from '../../../types/errors'
44
import { useTranslation } from 'react-i18next'
5-
import Box from '@mui/material/Box'
65

76
const OasisNameIndicator: FC = () => {
87
return (
@@ -53,10 +52,10 @@ export const AccountMetadataSourceIndicator: FC<AccountMetadataSourceIndicatorPr
5352

5453
const renderWithOrWithoutLabel = (label: string, labelNeeded: boolean, icon: JSX.Element) =>
5554
labelNeeded ? (
56-
<Box sx={{ display: 'inline-flex', gap: 2, alignItems: 'Center', fontWeight: 'normal' }}>
55+
<div className="inline-flex items-center gap-1 font-normal">
5756
{icon}
5857
{label}
59-
</Box>
58+
</div>
6059
) : (
6160
icon
6261
)

src/app/components/Account/ConsensusAccountDetailsView.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { useScreenSize } from '../../hooks/useScreensize'
66
import { TextSkeleton } from '../Skeleton'
77
import { StyledDescriptionList, StyledListTitleWithAvatar } from '../StyledDescriptionList'
88
import { DashboardLink } from '../../pages/ParatimeDashboardPage/DashboardLink'
9-
import Box from '@mui/material/Box'
109
import { styled } from '@mui/material/styles'
1110
import { useFormattedTimestampStringWithDistance } from '../../hooks/useFormattedTimestamp'
1211
import { AccountAvatar } from '../AccountAvatar'
@@ -61,16 +60,16 @@ export const ConsensusAccountDetailsView: FC<ConsensusAccountDetailsViewProps> =
6160
</>
6261
)}
6362
<StyledListTitleWithAvatar>
64-
<Box gap={1} sx={{ display: 'flex', alignItems: 'center' }}>
63+
<div className="flex items-center gap-1">
6564
<AccountAvatar account={account} />
6665
<AccountSizeBadge size={account.size} />
67-
</Box>
66+
</div>
6867
</StyledListTitleWithAvatar>
6968
<dd>
70-
<Box sx={{ display: 'inline-flex', alignItems: 'center' }}>
69+
<div className="inline-flex items-center">
7170
<ConsensusAccountLink alwaysTrim={false} network={account.network} address={account.address} />
7271
<CopyToClipboard value={account.address} />
73-
</Box>
72+
</div>
7473
</dd>
7574
<dt>
7675
<strong>{t('account.totalBalance')}</strong>

src/app/components/Account/ContractCreatorInfo.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
useGetRuntimeTransactionsTxHash,
99
} from '../../../oasis-nexus/api'
1010
import { AccountLink } from './AccountLink'
11-
import Box from '@mui/material/Box'
1211
import { Skeleton } from '@oasisprotocol/ui-library/src/components/ui/skeleton'
1312

1413
const TxSender: FC<{ scope: RuntimeScope; txHash: string; alwaysTrim?: boolean }> = ({
@@ -45,7 +44,7 @@ export const ContractCreatorInfo: FC<{
4544
) : (
4645
<>
4746
<TxSender scope={scope} txHash={creationTxHash} alwaysTrim={alwaysTrim} />
48-
<Box alignSelf="end">&nbsp;{t('contract.createdAt')}&nbsp;</Box>
47+
<div className="self-end">&nbsp;{t('contract.createdAt')}&nbsp;</div>
4948
<TransactionLink scope={scope} hash={creationTxHash} alwaysTrim={alwaysTrim} />
5049
</>
5150
)

src/app/components/Account/RuntimeAccountDetailsView.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { getFiatCurrencyForScope, showFiatValues } from '../../../config'
2323
import { CardEmptyState } from '../CardEmptyState'
2424
import { extractMinimalProxyERC1167 } from '../ContractVerificationIcon/extractMinimalProxyERC1167'
2525
import { AbiPlaygroundLink } from '../ContractVerificationIcon/AbiPlaygroundLink'
26-
import Box from '@mui/material/Box'
2726
import { transactionsContainerId } from '../../utils/tabAnchors'
2827

2928
type RuntimeAccountDetailsViewProps = {
@@ -74,10 +73,10 @@ export const RuntimeAccountDetailsView: FC<RuntimeAccountDetailsViewProps> = ({
7473
<AccountAvatar account={account} />
7574
</StyledListTitleWithAvatar>
7675
<dd>
77-
<Box sx={{ display: 'inline-flex', alignItems: 'center' }}>
76+
<div className="inline-flex items-center">
7877
<AccountLink showOnlyAddress={!!token?.name} scope={account} address={address!} />
7978
<CopyToClipboard value={address!} />
80-
</Box>
79+
</div>
8180
</dd>
8281

8382
{token && (
@@ -110,10 +109,10 @@ export const RuntimeAccountDetailsView: FC<RuntimeAccountDetailsViewProps> = ({
110109
<>
111110
<dt>{t('contract.verification.proxyERC1167')}</dt>
112111
<dd>
113-
<Box>
112+
<div>
114113
<AccountLink scope={account} address={extractMinimalProxyERC1167(account)!} />
115114
<AbiPlaygroundLink scope={account} address_eth={account.address_eth!} />
116-
</Box>
115+
</div>
117116
</dd>
118117
</>
119118
)}

src/app/components/AccountList/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { FC } from 'react'
22
import { useTranslation } from 'react-i18next'
3-
import Box from '@mui/material/Box'
43
import { getPreciseNumberFormat } from '../../../locales/getPreciseNumberFormat'
54
import { Table, TableCellAlign, TableColProps } from '../../components/Table'
65
import { RoundedBalance } from '../../components/RoundedBalance'
@@ -32,9 +31,9 @@ export const AccountList: FC<AccountListProps> = ({ isLoading, limit, pagination
3231
data: [
3332
{
3433
content: (
35-
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
34+
<div className="flex justify-center">
3635
<AccountSizeBadge size={account.size} />
37-
</Box>
36+
</div>
3837
),
3938
key: 'size',
4039
},

src/app/pages/RuntimeAccountDetailsPage/AccountNFTCollectionCard.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { FC } from 'react'
22
import { useTranslation } from 'react-i18next'
33
import { useLoaderData, Link as RouterLink, To } from 'react-router-dom'
4-
import Box from '@mui/material/Box'
54
import Card from '@mui/material/Card'
65
import CardContent from '@mui/material/CardContent'
76
import Link from '@mui/material/Link'
@@ -145,13 +144,13 @@ const AccountNFTCollection: FC<AccountNFTCollectionProps> = ({
145144
})}
146145
</ImageList>
147146
{pagination && (
148-
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
147+
<div className="flex justify-center">
149148
<TablePagination
150149
{...pagination}
151150
totalCount={totalCount}
152151
isTotalCountClipped={isTotalCountClipped}
153152
/>
154-
</Box>
153+
</div>
155154
)}
156155
</>
157156
)}

0 commit comments

Comments
 (0)