mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Another go at fixing the damn changelog
html_url is in the top-level 'commit' object, not in commit.commit. Also factor some code out for legibility. Seriously, what's with stuffing everything into inline functions?
This commit is contained in:
parent
0ab1dacb1e
commit
6cb7ffcd3b
@ -41,6 +41,16 @@ export default class ChangelogDialog extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
_elementsForCommit(commit) {
|
||||
return (
|
||||
<li key={commit.sha} className="mx_ChangelogDialog_li">
|
||||
<a href={commit.html_url} target="_blank" ref="noopener">
|
||||
{commit.commit.message}
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
const Spinner = sdk.getComponent('views.elements.Spinner');
|
||||
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog');
|
||||
@ -51,9 +61,7 @@ export default class ChangelogDialog extends React.Component {
|
||||
<div key={repo}>
|
||||
<h2>{repo}</h2>
|
||||
<ul>
|
||||
{this.state[repo].map(commit =>
|
||||
<li key={commit.commit.url} className="mx_ChangelogDialog_li"><a href={commit.commit.html_url} target="_blank" ref="noopener">{commit.commit.message}</a></li>
|
||||
)}
|
||||
{this.state[repo].map(this._elementsForCommit)}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user