mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-30 10:58:07 +03:00
fix(client): don't show trash icon if no comment
This commit is contained in:
@@ -183,22 +183,24 @@ function CommentModal({
|
||||
</div>
|
||||
</Form.Group>
|
||||
|
||||
<QuickTooltip tooltipContent="Remove your comment on this score.">
|
||||
<Button
|
||||
variant="outline-danger"
|
||||
onClick={() =>
|
||||
ModifyScore(scoreID, { comment: null }).then((r) => {
|
||||
if (r) {
|
||||
setComment(null);
|
||||
score.comment = null;
|
||||
setShow(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
>
|
||||
<Icon noPad type="trash" />
|
||||
</Button>
|
||||
</QuickTooltip>
|
||||
{comment !== null && (
|
||||
<QuickTooltip tooltipContent="Remove your comment on this score.">
|
||||
<Button
|
||||
variant="outline-danger"
|
||||
onClick={() =>
|
||||
ModifyScore(scoreID, { comment: null }).then((r) => {
|
||||
if (r) {
|
||||
setComment(null);
|
||||
score.comment = null;
|
||||
setShow(false);
|
||||
}
|
||||
})
|
||||
}
|
||||
>
|
||||
<Icon noPad type="trash" />
|
||||
</Button>
|
||||
</QuickTooltip>
|
||||
)}
|
||||
</Form>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user