Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base version #1169

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

base version #1169

wants to merge 4 commits into from

Conversation

vanvalera
Copy link

Copy link

@anastasiiavorobiova anastasiiavorobiova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!
A user shouldn't be able to post empty comments
Screenshot 2024-09-25 at 17 55 10

src/App.tsx Outdated
<UserSelector users={users} onUserSelect={handleUserSelect} />
</div>
<div className="block" data-cy="MainContent">
{isLoading ? (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using nested ternaries

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 👍
Let's improve your code

  1. The author name and comment cannot be only spaces, you need to fix it
image

Copy link

@TarasHoliuk TarasHoliuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with 2 comments just FYI ✔️

No comments yet
</p>
useEffect(() => {
if (!id) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

post.id is always defined

const [comments, setComments] = useState<Comment[]>([]);
const [loading, setLoading] = useState(false);
const [error, setError] = useState(false);
const [deleting, setDeleting] = useState<number | null>(null);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe deletingCommentId ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants