Prowlarr/frontend/src/System/Updates/UpdateChanges.js
Taloth Saldono 863252d7e9 Allow inline markdown in the changelog for linking to wiki
(cherry picked from commit c73649b19b76b9032f9b5340590dbae783ae259f)
2020-08-12 23:10:40 -04:00

46 lines
885 B
JavaScript

import PropTypes from 'prop-types';
import React, { Component } from 'react';
import InlineMarkdown from 'Components/Markdown/InlineMarkdown';
import styles from './UpdateChanges.css';
class UpdateChanges extends Component {
//
// Render
render() {
const {
title,
changes
} = this.props;
if (changes.length === 0) {
return null;
}
return (
<div>
<div className={styles.title}>{title}</div>
<ul>
{
changes.map((change, index) => {
return (
<li key={index}>
<InlineMarkdown data={change} />
</li>
);
})
}
</ul>
</div>
);
}
}
UpdateChanges.propTypes = {
title: PropTypes.string.isRequired,
changes: PropTypes.arrayOf(PropTypes.string)
};
export default UpdateChanges;