Skip to content

Commit

Permalink
[Upd #70] Refactor for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope committed Jan 27, 2022
1 parent 8517a4d commit af9d67f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/comment/CommentList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import Constants from '../../constants/Constants';
import { Rings } from 'react-loader-spinner';

const CommentList = (props) => {
const [isCommentDeleted, setIsCommentDeleted] = useState(false);
const [isDeleting, setIsDeleting] = useState(false);

const deleteCommentViewHandler = () => {
setIsCommentDeleted(true);
setIsDeleting(true);
setTimeout(() => {
setIsCommentDeleted(false);
setIsDeleting(false);
}, 2000);
};

return (
<span>
{isCommentDeleted ? (
{isDeleting ? (
<div className="comment-delete">
<Rings color="#00BFFF" height={80} width={80} />
<p>Deleting comment...</p>
Expand Down

0 comments on commit af9d67f

Please sign in to comment.