rating-reactivity-fixing-2

This commit is contained in:
Untone 2024-02-16 11:02:00 +03:00
parent dab1eff314
commit dfb2b17116

View File

@ -132,10 +132,11 @@ export const RatingControl = (props: RatingControlProps) => {
onClick={() => handleRatingChange(ReactionKind.Dislike)}
disabled={isLoading()}
class={
props.comment ? clsx(stylesComment.commentRatingControl,
stylesComment.commentRatingControlUp,
{ [stylesComment.voted]: myRate()?.kind === 'LIKE'}
) : ''
props.comment
? clsx(stylesComment.commentRatingControl, stylesComment.commentRatingControlUp, {
[stylesComment.voted]: myRate()?.kind === 'LIKE',
})
: ''
}
>
<Show when={!props.comment}>
@ -157,10 +158,11 @@ export const RatingControl = (props: RatingControlProps) => {
onClick={() => handleRatingChange(ReactionKind.Like)}
disabled={isLoading()}
class={
props.comment ? clsx(stylesComment.commentRatingControl,
stylesComment.commentRatingControlDown,
{ [stylesComment.voted]: myRate()?.kind === 'DISLIKE'}
) : ''
props.comment
? clsx(stylesComment.commentRatingControl, stylesComment.commentRatingControlDown, {
[stylesComment.voted]: myRate()?.kind === 'DISLIKE',
})
: ''
}
>
<Show when={!props.comment}>