-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: master
Are you sure you want to change the base?
base version #1169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/App.tsx
Outdated
<UserSelector users={users} onUserSelect={handleUserSelect} /> | ||
</div> | ||
<div className="block" data-cy="MainContent"> | ||
{isLoading ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using nested ternaries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe deletingCommentId ?
https://vanvalera.github.io/react_dynamic-list-of-posts/