fix line wrap and timestamp font

This commit is contained in:
muzam1l
2022-03-08 19:18:51 +05:30
parent ce91182c7b
commit db0ffe999e
2 changed files with 9 additions and 3 deletions

View File

@@ -172,7 +172,8 @@ export const Log: FC<ILog> = ({
},
[accounts]
);
const message = enrichAccounts(_message.trim());
_message = _message.trim().replace(/\n /gi, "\n");
const message = enrichAccounts(_message);
const jsonData = enrichAccounts(_jsonData);
return (
@@ -182,8 +183,8 @@ export const Log: FC<ILog> = ({
activeAccountAddress={dialogAccount}
/>
<LogText variant={type}>
{timestamp && <Text muted>{timestamp} </Text>}
<Pre line>{message} </Pre>
{timestamp && <Text muted monospace>{timestamp} </Text>}
<Pre>{message} </Pre>
{link && (
<NextLink href={link} shallow passHref>
<Link as="a">{linkText}</Link>

View File

@@ -14,6 +14,11 @@ const Text = styled("span", {
true: {
color: '$mauve9'
}
},
monospace: {
true: {
fontFamily: '$monospace'
}
}
}
});