Skip to content

Commit

Permalink
Use simple strings instead of JSX expressions, if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed Jun 29, 2023
1 parent d729570 commit 8d9cab1
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/components/ParaTimePicker/LayerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const DisabledLayerMenuItem: FC<BaseLayerMenuItemProps> = ({ divider, lay
const labels = getLayerLabels(t)

return (
<Tooltip arrow placement="top" title={'Coming soon'}>
<Tooltip arrow placement="top" title="Coming soon">
{/* Div is needed because we need an element with enabled pointer-events to make Tooltip work */}
<div>
<MenuItem disabled divider={divider}>
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/RoundedBalance/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('RoundedBalance', () => {

describe('RoundedRoseBalance', () => {
it('should render value with ROSE ticker symbol', () => {
render(<RoundedBalance value="0.002231" ticker={'ROSE'} />)
render(<RoundedBalance value="0.002231" ticker="ROSE" />)

expect(screen.getByText('0.00223… ROSE')).toBeInTheDocument()
})
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const TertiaryButton = forwardRef(
const { t } = useTranslation()

return (
<StyledButton {...restProps} ref={ref} color={'tertiary'}>
<StyledButton {...restProps} ref={ref} color="tertiary">
<Typography variant="select">{children ? children : t('select.placeholder')}</Typography>
{ownerState.open ? <ExpandLessIcon /> : <ExpandMoreIcon />}
</StyledButton>
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/TransactionStatusIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const statusFgColor: Record<TxStatus, string> = {
}

const statusIcon: Record<TxStatus, ReactNode> = {
unknown: <HelpIcon color={'inherit'} fontSize="inherit" />,
unknown: <HelpIcon color="inherit" fontSize="inherit" />,
success: <CheckCircleIcon color="success" fontSize="inherit" />,
failure: <CancelIcon color="error" fontSize="inherit" />,
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Transactions/LogEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const TransactionLogEvent: FC<{

return (
<>
{!isFirst && <Divider variant={'card'} />}
{!isFirst && <Divider variant="card" />}
<StyledDescriptionList titleWidth={isMobile ? '100px' : '200px'}>
{decoded && (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/SearchResultsPage/NoResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const NoResults: FC<{
i18nKey="search.noResults.description"
components={{
OptionalBreak: <OptionalBreak />,
HomeLink: <Link component={RouterLink} to={'/'} />,
HomeLink: <Link component={RouterLink} to="/" />,
}}
/>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('SearchResultsView', () => {
hasUsedCoinGecko: false,
},
}}
title={'test search'}
title="test search"
networkForTheme={Network.mainnet}
/>,
)
Expand All @@ -59,7 +59,7 @@ describe('SearchResultsView', () => {
renderWithProviders(
<SearchResultsList
searchResults={[suggestedParsedAccountResult]}
title={'test search'}
title="test search"
networkForTheme={Network.mainnet}
tokenPrices={{
[Network.mainnet]: {
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/SearchResultsPage/notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const HideMoreResults: FC<{ theme: Theme; onHide: () => void }> = ({ them
<NotificationBox theme={theme} onClick={onHide}>
<ZoomOut />
<span>
<Trans i18nKey={'search.otherResults.clickToHide'} />
<Trans i18nKey="search.otherResults.clickToHide" />
</span>
</NotificationBox>
)
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/TransactionDetailPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const TransactionDetailPage: FC = () => {
return (
<PageLayout>
{warningMultipleTransactionsSameHash && (
<StyledAlert severity={'error'}>{t('transaction.warningMultipleTransactionsSameHash')}</StyledAlert>
<StyledAlert severity="error">{t('transaction.warningMultipleTransactionsSameHash')}</StyledAlert>
)}
<SubPageCard
featured
Expand Down

0 comments on commit 8d9cab1

Please sign in to comment.