fix: break words in swap error messages (fixes https://github.com/Uniswap/uniswap-interface/issues/1462)

This commit is contained in:
Moody Salem 2021-05-14 10:50:55 -05:00
parent 5bc5d6504e
commit 4745052f0e
No known key found for this signature in database
GPG Key ID: 8CB5CD10385138DB
2 changed files with 7 additions and 2 deletions

@ -184,7 +184,12 @@ export function TransactionErrorContent({ message, onDismiss }: { message: strin
</RowBetween> </RowBetween>
<AutoColumn style={{ marginTop: 20, padding: '2rem 0' }} gap="24px" justify="center"> <AutoColumn style={{ marginTop: 20, padding: '2rem 0' }} gap="24px" justify="center">
<AlertTriangle color={theme.red1} style={{ strokeWidth: 1.5 }} size={64} /> <AlertTriangle color={theme.red1} style={{ strokeWidth: 1.5 }} size={64} />
<Text fontWeight={500} fontSize={16} color={theme.red1} style={{ textAlign: 'center', width: '85%' }}> <Text
fontWeight={500}
fontSize={16}
color={theme.red1}
style={{ textAlign: 'center', width: '85%', wordBreak: 'break-word' }}
>
{message} {message}
</Text> </Text>
</AutoColumn> </AutoColumn>

@ -171,7 +171,7 @@ export function SwapCallbackError({ error }: { error: string }) {
<SwapCallbackErrorInnerAlertTriangle> <SwapCallbackErrorInnerAlertTriangle>
<AlertTriangle size={24} /> <AlertTriangle size={24} />
</SwapCallbackErrorInnerAlertTriangle> </SwapCallbackErrorInnerAlertTriangle>
<p>{error}</p> <p style={{ wordBreak: 'break-word' }}>{error}</p>
</SwapCallbackErrorInner> </SwapCallbackErrorInner>
) )
} }