Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Conversation

@SathiC1990
Copy link

#page.js.
#layout.js
#footer.js

@SathiC1990 SathiC1990 changed the title React-11 week-1 React-1- week-1 Jun 5, 2025
Copy link

@reza-faghani reza-faghani left a comment

Choose a reason for hiding this comment

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

Consider refactoring the repeated crew member data in ourCrew.js into an array of objects and using .map() to render the components. This will make the code cleaner, easier to update, and more maintainable. See example below:

const crewMembers = [
  {
    name: "Sarah Vega",
    role: "Captain",
    image: "/crew/image-mark-shuttleworth.png",
    description: "A former NASA astronaut with over 15 years of experience, Captain Vega leads our missions with unparalleled expertise and a passion for space exploration."
  },
  // ...other crew members
];

return (
  <div className={styles.crewMembers}>
    {crewMembers.map((member) => (
      <div key={member.name} className={styles.crewMember}>
        <img src={member.image} alt={`${member.name}, ${member.role}`} />
        <h3>{member.name}</h3>
        <p>{member.role}</p>
        <p>{member.description}</p>
      </div>
    ))}
  </div>
);

This approach is already used in ourPartner.js, and applying it here will keep your code consistent and scalable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants