Develop Updates (#44)
* removed justified alignment from list items * removed Google Docs underline on hyperlinks
This commit is contained in:
parent
fdf209c265
commit
2c08eaad33
|
@ -51,6 +51,16 @@ export function RichBody(props: Props): ReactElement {
|
|||
node.data.uri.indexOf('://oxen.io') >= 0
|
||||
? node.data.uri.split('://oxen.io')[1]
|
||||
: node.data.uri;
|
||||
// Remove Google Docs styling
|
||||
const renderChildren = Children.map(children, (child: any) => {
|
||||
if (child.type === 'span' && child.props.className === 'underline') {
|
||||
const newProps = {
|
||||
...child.props,
|
||||
className: undefined,
|
||||
};
|
||||
return cloneElement(child, newProps);
|
||||
}
|
||||
});
|
||||
return (
|
||||
<Link href={url} scroll={!isLocal(node.data.uri)}>
|
||||
<a
|
||||
|
@ -63,7 +73,7 @@ export function RichBody(props: Props): ReactElement {
|
|||
}
|
||||
rel="noreferrer"
|
||||
>
|
||||
{children}
|
||||
{renderChildren}
|
||||
</a>
|
||||
</Link>
|
||||
);
|
||||
|
@ -166,7 +176,7 @@ export function RichBody(props: Props): ReactElement {
|
|||
if (child.type === 'p') {
|
||||
const newProps = {
|
||||
...child.props,
|
||||
className: 'mb-3 font-sans tracking-wide text-justify',
|
||||
className: 'mb-3 font-sans tracking-wide',
|
||||
};
|
||||
return cloneElement(child, newProps);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue