Skip to content

Commit

Permalink
Merge pull request #7 from takahashim/button-loading-message
Browse files Browse the repository at this point in the history
コメント読み込み中にはボタンを消さないようにする
  • Loading branch information
ayuki-joto authored Sep 28, 2021
2 parents bf33bf7 + f2aee5b commit e0aa682
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions decidim-comments/app/frontend/comments/comments.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ export class Comments extends React.Component<CommentsProps, CommentsState> {
* @returns {Void|ReactComponent} - A AddCommentForm component or nothing
*/
private _renderAllCommentsButton(totalCommentsCount: number) {
const { loading } = this.props;
const allCommentsNum = 0;

const limit = this.state.limit;
Expand All @@ -231,6 +232,14 @@ export class Comments extends React.Component<CommentsProps, CommentsState> {
</button>
</div>
);
} else if (loading) {
return (
<div className="">
<button className="button expanded">
{I18n.t("components.comments.loading")}
</button>
</div>
);
}
}

Expand Down

0 comments on commit e0aa682

Please sign in to comment.