Skip to content

Commit

Permalink
Fix unintended linebreak around address
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed May 9, 2024
1 parent 2b5b13f commit 95682bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
13 changes: 13 additions & 0 deletions src/app/components/Account/AccountLinkWithAddressSwitch.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
import { AccountLink } from './AccountLink'
import { withAddressSwitch } from './withAddressSwitch'
import Box from '@mui/material/Box'

export const AccountLinkWithAddressSwitch = withAddressSwitch(AccountLink)

export const WrappedAccountLinkWithAddressSwitch: typeof AccountLinkWithAddressSwitch = props => (
<Box
sx={{
display: 'inline-flex',
maxWidth: '100%',
paddingRight: '0.5em',
}}
>
<AccountLinkWithAddressSwitch {...props} />
</Box>
)
9 changes: 6 additions & 3 deletions src/app/components/RuntimeEvents/RuntimeEventDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ import StreamIcon from '@mui/icons-material/Stream'
import LocalFireDepartmentIcon from '@mui/icons-material/LocalFireDepartment'
import { getPreciseNumberFormat } from '../../../locales/getPreciseNumberFormat'
import { MaybeEventErrorLine } from './EventError'
import { AccountLinkWithAddressSwitch } from '../Account/AccountLinkWithAddressSwitch'
import {
AccountLinkWithAddressSwitch,
WrappedAccountLinkWithAddressSwitch,
} from '../Account/AccountLinkWithAddressSwitch'
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward'
import ArrowForwardIcon from '@mui/icons-material/ArrowForward'
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward'
Expand Down Expand Up @@ -207,7 +210,7 @@ export const RuntimeEventDetails: FC<{
<br />
{t('runtimeEvent.fields.emittingContract')}:
<br />
<AccountLinkWithAddressSwitch
<WrappedAccountLinkWithAddressSwitch
scope={scope}
addressSwitchOption={addressSwitchOption}
ethAddress={emittingEthAddress}
Expand Down Expand Up @@ -249,7 +252,7 @@ export const RuntimeEventDetails: FC<{
<br />
{t('runtimeEvent.fields.emittingContract')}:
<br />
<AccountLinkWithAddressSwitch
<WrappedAccountLinkWithAddressSwitch
scope={scope}
addressSwitchOption={addressSwitchOption}
ethAddress={emittingEthAddress}
Expand Down

0 comments on commit 95682bc

Please sign in to comment.