2019-10-03 23:17:04 +07:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import { preventXSS } from '../../utils/sec-utils';
|
|
|
|
import Readme from '../Readme';
|
2020-03-03 04:05:24 +07:00
|
|
|
import { ReadmeSpacing } from './styles';
|
2019-10-03 23:17:04 +07:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
description?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const DetailContainerContentReadme: React.FC<Props> = ({ description }) => {
|
2020-03-03 04:05:24 +07:00
|
|
|
if (!description) {
|
|
|
|
return null;
|
|
|
|
}
|
2019-10-03 23:17:04 +07:00
|
|
|
const encodedReadme = preventXSS(description);
|
2020-03-03 04:05:24 +07:00
|
|
|
return <ReadmeSpacing><Readme description={encodedReadme} /></ReadmeSpacing>;
|
2019-10-03 23:17:04 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
export default DetailContainerContentReadme;
|