Skip to content

Conversation

@amrendrakind
Copy link
Owner

Space Travellers' Hub

Created the homepage leading to the "Rockets" section

  • It let you make a reservation and show changes on time

Created a "Missions" sections

  • Shows a list of missions and allows to join them showing changes on time

Created a "Dragons" sections

  • It let you make a reservation and show changes on time

Created a "My Profile" section

  • Shows both reserved Rockets and Joined missions and it updates on time

All the information is taken from the provided APIs

Copy link
Collaborator

@Ol-create Ol-create left a comment

Choose a reason for hiding this comment

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

Hi @amrendrakind 👋 ,

Good job so far working on the project requirements!

There are some issues that you still need to work on to go to the next project but you are almost there!

To Highlight 🎯

  • No linter errors. ✔️
  • GitHub flow is followed. ✔️
  • Good Pr title/description ✔️
  • Good commit history ✔️

Required Changes ♻️

Kindly fix the issues described in the pr thread below in order to get an approval

Optional suggestions
Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.

Cheers and Happy coding!clapclapclap

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me @Ol-create in your question so I can receive the notification.

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.
Happy coding! 🎉 🎉

Comment on lines 1 to 9
import logo from './logo.svg';
import React from 'react';
import { Route, Routes } from 'react-router-dom';
import './App.css';
import NotFound from './components/pages/NotFound';
import Dragons from './components/dragon/dragons';
import MissionsContainer from './components/pages/MissionsContainer';
import Rockets from './components/rockets/Rockets';
import NavBar from './components/navbar/NavBar';
import ProfileContainer from './components/pages/ProfileContainer';
Copy link
Collaborator

@Ol-create Ol-create Jun 1, 2023

Choose a reason for hiding this comment

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

  • Please take into consideration the following suggestions to enhance the readability of your code:
  1. Group the imports: Organize the imports into logical groups based on their source or functionality. For example, you can have separate groups for built-in modules, third-party libraries, and local project files.

  2. Alphabetize the imports within each group: Within each import group, arrange the imports in alphabetical order based on their source. This approach provides a consistent and predictable ordering for easy reference.

By implementing these recommendations, your code will become more structured and easier to navigate.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thank you for your suggestions to enhance the readability of my code. 💯

Comment on lines 6 to 10
const DragonElement = (props) => {
const dispatch = useDispatch();
const {
id, name, description, flickrImages, reserved,
} = props;
Copy link
Collaborator

@Ol-create Ol-create Jun 1, 2023

Choose a reason for hiding this comment

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

  • Please consider to destructure the props directly in the function signature.
    To improved readability and avoiding repetition:+1:

Copy link
Owner Author

Choose a reason for hiding this comment

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

I appreciate your advice and have implemented it in this approach to enhance the readability and maintainability of my code. Thank you for your valuable suggestion. 👍

Comment on lines 12 to 36
DragonElement.defaultProps = { // Modifying defaultProps inside the component is not recommended
reserved: false,
};

const reserveDragonHandler = (e) => {
if (props.reserved) { // Accessing props directly in the handler is not efficient
dispatch(DragonsActions.unreserveDragon(e.target.id));
} else {
dispatch(DragonsActions.reserveDragon(e.target.id));
}
};

const reservation = props.reserved ? 'Cancel Reservation' : 'Reserve Dragon'; // Accessing props directly
const btnClass = props.reserved ? 'grayBtn' : 'blueBtn'; // Accessing props directly

return (
<div className="dragonEl">
<div className="dragonImg">
<img src={flickrImages} alt={description} />
</div>
<div>
<h2>{name}</h2>
<p>
{props.reserved && <span className="badge">Reserved</span>} {/* Using unnecessary parentheses */}
{description}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest that you remove unnecessary comments, to Improved code readability and avoiding confusion and misinformation 🎉 🎉

Comment on lines 6 to 8
const JoinButton = (props) => {
const { dragon } = props;
const { id, reserved } = dragon;
Copy link
Collaborator

@Ol-create Ol-create Jun 1, 2023

Choose a reason for hiding this comment

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

  • Please destructured the dragon prop directly in the function signature.
    To improved readability and avoiding repetition 👍

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thank you for your valuable suggestion.
I have implemented it 👍

Comment on lines 30 to 38
JoinButton.propTypes = {
dragon:
PropTypes.objectOf(
{
id: PropTypes.number,
reserved: PropTypes.string,
},
).isRequired,
};
Copy link
Collaborator

@Ol-create Ol-create Jun 1, 2023

Choose a reason for hiding this comment

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

  • Please consider removing unnecessary nesting in the propTypes definition.
    By removing unnecessary nesting, you make the propTypes definition more straightforward and easier to comprehend. It allows developers to quickly identify and understand the expected props for a component without having to navigate through unnecessary layers of nesting. 🎉 🎉

Copy link
Owner Author

Choose a reason for hiding this comment

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

I appreciate your advice
I have implemented in this approach to enhance the readability and maintainability of my code.
Thank you for your valuable suggestion. 🥇

Comment on lines +17 to +25
{dragonsList.map((dragon) => (
<DragonElement
key={dragon.dry_mass_kg}
id={dragon.id}
name={dragon.name}
description={dragon.description}
flickrImages={dragon.flickr_images[0]}
reserved={dragon.reserved}
/>
Copy link
Collaborator

@Ol-create Ol-create Jun 1, 2023

Choose a reason for hiding this comment

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

  • Please consider destructuring the necessary properties (id, name, description, flickr_images, reserved) directly
    from the dragon object, to improved readability and avoiding repetition 👍

Copy link
Owner Author

Choose a reason for hiding this comment

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

I appreciate your advice
I have implemented in this approach to enhance the readability and maintainability of my code.
Thank you for your valuable suggestion. 🥇 🥇

<ul className="nav-links">
{links.map((link) => (
<li className="nav-link" key={link.id}>
<NavLink to={link.path}>
Copy link
Collaborator

@Ol-create Ol-create Jun 1, 2023

Choose a reason for hiding this comment

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

  • Please add the activeClassName prop to the NavLink component
    to specify the class name for the active link. 👍

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thank you buddy 👍

Copy link
Collaborator

@Ol-create Ol-create left a comment

Choose a reason for hiding this comment

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

Status: Approved 🍾 ✔️🎊

Congratulations! 🎉 Project Approved ✅

Good job so far. Well Done.👍🏻
Your project is complete! There is nothing else to say other than... it's time to merge it :shipit:
codeReview4

To Highlight 🎉

  • No linter errors. ✔️
  • Git flow is followed. ✔️
  • You have followed JavaScript best practices. ✔️
  • Professional README file. ✔️
  • PR has a good title and summary. ✔️
  • Your app works as expected 💯 🥇
  • Your Design looks awesome, keep rocking 🚀

Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.

Cheers 🥂 and Happy coding!!! 👯💻

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please ping me @Ol-create when you comment so I can receive the notification.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

@amrendrakind
Copy link
Owner Author

Thank you @Ol-create 👍
I appreciate your time and effort 💯

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