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

Missions/buttons #29

Merged
merged 6 commits into from
Mar 2, 2022
Merged

Missions/buttons #29

merged 6 commits into from
Mar 2, 2022

Conversation

Bondok6
Copy link
Collaborator

@Bondok6 Bondok6 commented Mar 1, 2022

Hello @Leboroz πŸ™‹β€β™‚οΈ,

Thanks for taking the time to review my project.


I've done with these issues

Gif found on CodeReviewGifs.com hosted on Giphy.com

@Bondok6 Bondok6 requested a review from Leboroz March 1, 2022 21:05
Copy link
Owner

@Leboroz Leboroz left a comment

Choose a reason for hiding this comment

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

Hello @Bondok6, πŸ‘‹

Good job so far. I learned a lot with this code.

good job

Comment on lines 19 to 23
{!status ? (
<Badge bg="secondary">Not A Member</Badge>
) : (
<Badge bg="primary">Active Member</Badge>
)}
Copy link
Owner

Choose a reason for hiding this comment

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

I think it is more efficient to do a variable(But I am not sure we could argue):

const button = !status 
  ? { class: "secondary", text: "Not a Member" } 
  : { class: "secondary", text: "Active Member" };

.
.
.

<Badge bg={button.class}>{button.text}</Badge>

Copy link
Collaborator Author

@Bondok6 Bondok6 Mar 2, 2022

Choose a reason for hiding this comment

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

Thank you for your review @Leboroz, but In my opinion it's not a big deal because React doc uses the same way (Inline If-Else with Conditional Operator)

Maybe your way is more readable but I can use it only with the badges. But I can't use it with the buttons because I have events on these buttons (onClick).

I agree that your way is more readable, so I will implement it on the badges. πŸ’―

Add badge object that contains style and text
@Bondok6 Bondok6 merged commit fea1d67 into develop Mar 2, 2022
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.

None yet

2 participants