Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
smanolloff committed May 26, 2020
1 parent 20fb5ec commit abd1383
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const jsonObjectOrArrayStartRegex = /^(\[|\{)/;

function tryParseJson(value: string) {
try {
return JSON.parse(value)
return JSON.parse(value);
} catch (_) {
return value;
}
Expand All @@ -37,7 +37,7 @@ const stringMarkup = (value: string) => (
<div className="json-markup">
<span className="json-markup-string">{value}</span>
</div>
)
);

function _jsonMarkup(value: any) {
const markup = { __html: jsonMarkup(value) };
Expand All @@ -58,14 +58,10 @@ function formatValue(value: any) {
? _jsonMarkup(tryParseJson(value))
: stringMarkup(value);
} else {
content = _jsonMarkup(value)
content = _jsonMarkup(value);
}

return (
<div className="ub-inline-block">
{content}
</div>
)
return <div className="ub-inline-block">{content}</div>;
}

export const LinkValue = (props: { href: string; title?: string; children: React.ReactNode }) => (
Expand Down

0 comments on commit abd1383

Please sign in to comment.