Skip to content

Commit a401173

Browse files
Modified Button in Comment Section and Added feature to the Button w/signoff
Signed-off-by: AnshumanDhiman <[email protected]>
1 parent 0e06ed2 commit a401173

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

src/assets/scss/components/comments.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
}
3030
}
3131

32+
.btn-comment-edit {
33+
margin:2% 0;
34+
}
35+
3236
.comment-form {
3337
margin: 16px 0px;
3438
}

src/components/Comments.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,11 @@ const Comments = (props) => {
173173
Reply
174174
</Button>
175175
)}
176-
{data.user_story_comment_replies.length > 0 ? (
176+
<br/>
177+
{data.user_story_comment_replies.length == 1 ? (
178+
177179
<Button
178-
className='btn btn-default'
180+
className='btn btn-default btn-comment-edit'
179181
onClick={() => {
180182
toggleViewReplies(
181183
viewRepliesToggled,
@@ -184,11 +186,23 @@ const Comments = (props) => {
184186
)
185187
}}
186188
>
187-
View Replies ({data.user_story_comment_replies.length})
189+
{data.user_story_comment_replies.length} Reply
188190
</Button>
189-
) : (
191+
) : data.user_story_comment_replies.length == 0 ? (
190192
''
191-
)}
193+
) : ( <Button
194+
className='btn btn-default btn-comment-edit'
195+
onClick={() => {
196+
toggleViewReplies(
197+
viewRepliesToggled,
198+
setViewRepliesToggled,
199+
key
200+
)
201+
}}
202+
>
203+
{data.user_story_comment_replies.length} Replies
204+
</Button>) }
205+
192206
</div>
193207
{viewRepliesToggled.find((item) => item === key + 1) &&
194208
data.user_story_comment_replies.map((reply, key) => (

src/config.json.template

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)