diff --git a/app/about_us/OurCrew.js b/app/about_us/OurCrew.js
new file mode 100644
index 00000000..65ab4ca3
--- /dev/null
+++ b/app/about_us/OurCrew.js
@@ -0,0 +1,56 @@
+const OurCrew = () => {
+
+ const crewMembers = [
+ {
+ name: "Captain Sarah Vega",
+ role: "Captain",
+ 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.",
+ image: "/crew/image-anousheh-ansari.png"
+ },
+ {
+ name: "Dr. Leo Redding",
+ role: "Chief Astrophysicist",
+ description: "Dr. Redding is a renowned scientist who has contributed to major space discoveries. He ensures that every journey is as educational as it is exhilarating.",
+ image: "/crew/image-douglas-hurley.png"
+ },
+ {
+ name: "Chief Engineer Hana Lee",
+ role: "Chief Engineer",
+ description: "With her extensive background in aerospace engineering, Hana Lee is responsible for the state-of-the-art technology that powers our spacecraft. Her innovation ensures that our travelers are always in safe hands.",
+ image: "/crew/image-mark-shuttleworth.png"
+ },
+ {
+ name: "Mission Specialist Alex Santos",
+ role: "Mission Specialist",
+ description: "As a mission specialist, Alex’s job is to ensure that every aspect of the journey runs smoothly. With a background in both science and adventure tourism, Alex is the perfect guide for our space travelers.",
+ image: "/crew/image-victor-glover.png"
+ },
+ {
+ name: "Crew Member Maya Patel",
+ role: "Crew Member",
+ description: "Maya brings a unique blend of technical skills and customer service experience to the team. She’s always ready to assist with any needs and to make sure every traveler has an unforgettable experience.",
+ image: "/crew/image-mark-shuttleworth.png"
+ }
+ ];
+ // TASK - React 1 week 1
+ // Create the "Our Crew section"
+ // Use the descriptions provided in /app/about_us/README.md
+ // Use the pictures from /public/crew
+ // Some inspiration ideas found in /data/inspiration_about_us
+ return (
+
+
Our Crew
+
+ {crewMembers.map((member, index) => (
+
+
+
{member.name}
+
{member.role}
+
{member.description}
+
+ ))}
+
+
+ );
+}
+export default OurCrew;
\ No newline at end of file
diff --git a/app/about_us/OurPartners.js b/app/about_us/OurPartners.js
new file mode 100644
index 00000000..a2e15629
--- /dev/null
+++ b/app/about_us/OurPartners.js
@@ -0,0 +1,33 @@
+const OurPartners = () => {
+ // TASK - React 1 week 1
+ // Create the "Our Crew section"
+ // Use the descriptions provided in /app/about_us/README.md
+ // Use the pictures from /public/crew
+ // Some inspiration ideas found in /data/inspiration_about_us
+
+ const partners = [
+ "/business_partners/alphabet-logo.png",
+ "/business_partners/amazon_logo.png",
+ "/business_partners/CBC_Logo_White.png",
+ "/business_partners/Microsoft-Logo-White.png",
+ "/business_partners/nyu-logo.png",
+ "/business_partners/QueensLogo-White.png",
+ "/business_partners/samsung-logo.png",
+ "/business_partners/sodexo-logo.png"
+];
+
+return (
+
+
Our Partners
+
+ {partners.map((logo, index) => (
+
+
+
+ ))}
+
+
+);
+}
+
+export default OurPartners;
\ No newline at end of file
diff --git a/app/about_us/OurValues.js b/app/about_us/OurValues.js
new file mode 100644
index 00000000..0622444d
--- /dev/null
+++ b/app/about_us/OurValues.js
@@ -0,0 +1,39 @@
+const OurValues = () => {
+ // TASK - React 1 week 1
+ // Create the "Our Values" section
+ // Use the descriptions provided in /app/about_us/README.md
+ // Some inspiration ideas found in /data/inspiration_about_us
+ const values = [
+ {
+ title: "Exploration",
+ description: "We are driven by a deep-seated desire to explore the unknown. We believe that the pursuit of discovery is at the heart of human nature, and we are committed to pushing the boundaries of what is possible."
+ },
+ {
+ title: "Innovation",
+ description: "At Galactica, we prioritize cutting-edge technology and innovation. We are constantly evolving our spacecraft, safety protocols, and services to ensure that our travelers experience the most advanced and secure space journeys available."
+ },
+ {
+ title: "Sustainability",
+ description: "We are committed to making space exploration sustainable for future generations. Our space missions are designed to minimize environmental impact, both on Earth and in space, and to foster a spirit of responsibility towards our universe."
+ },
+ {
+ title: "Community",
+ description: "We believe in the power of collective exploration. Our journeys are not just about reaching new destinations; they are about building a community of space enthusiasts who share a passion for the stars."
+ }
+ ];
+
+ return (
+
+
Our Values
+
+ {values.map((value, index) => (
+
+
{value.title}
+
{value.description}
+
+ ))}
+
+
+ );
+};
+export default OurValues;
\ No newline at end of file
diff --git a/app/about_us/page.js b/app/about_us/page.js
index 880ec427..9cd103d0 100644
--- a/app/about_us/page.js
+++ b/app/about_us/page.js
@@ -1,41 +1,18 @@
import styles from './page.module.css';
+import OurValues from './OurValues';
+import OurCrew from './OurCrew';
+import OurPartners from './OurPartners';
+
-// TASK - React 1 week 1
// After you are finished with creating the page, move the OurValues, OurCrew, OurPartners components into their own files
// OurValues.js, OurCrew.js, OurPartners.js should live in this folder
// import and use the components from the newly created files
-const OurValues = () => {
- // TASK - React 1 week 1
- // Create the "Our Values" section
- // Use the descriptions provided in /app/about_us/README.md
- // Some inspiration ideas found in /data/inspiration_about_us
- return (
-
ADD OUR VALUES HERE
- );
-};
-
-const OurCrew = () => {
- // TASK - React 1 week 1
- // Create the "Our Crew section"
- // Use the descriptions provided in /app/about_us/README.md
- // Use the pictures from /public/crew
- // Some inspiration ideas found in /data/inspiration_about_us
- return (
-
ADD OUR CREW HERE
- );
-}
-const OurPartners = () => {
- // TASK - React 1 week 1
- // Create the "Our Crew section"
- // Use the descriptions provided in /app/about_us/README.md
- // Use the pictures from /public/crew
- // Some inspiration ideas found in /data/inspiration_about_us
- return (
-
+
+
- {/* TASK - React 1 week 1 */}
+
{/* Add in the "OurPartners" component here */}
+
);
diff --git a/app/destination/page.js b/app/destination/page.js
index 006037be..0f7974cd 100644
--- a/app/destination/page.js
+++ b/app/destination/page.js
@@ -1,26 +1,25 @@
"use client";
-
-import { useState } from 'react';
-
-import styles from '@/components/destination/destination.module.css';
-import { AddWishlistItem } from '@/components/destination/AddWishlistItem';
+import { useState } from "react";
+import styles from "@/components/destination/destination.module.css";
+import AddWishlistItem from "@/components/destination/AddWishlistItem";
+import PlanetWishlistItem from "@/components/destination/PlanetWishlistItem";
+import PlanetCard from "@/components/destination/PlanetCard";
// TASK - React 1 week 2
-// Move this to its own file
-const PlanetWishlistItem = ({
- name,
- onRemove,
- thumbnail,
-}) => {
- return (
-
-
- {name.toUpperCase()}
-
-
- );
-}
-
+// Move this to its own file ---- done
+// const PlanetWishlistItem = ({
+// name,
+// onRemove,
+// thumbnail,
+// }) => {
+// return (
+//
+//
+// {name.toUpperCase()}
+//
+//
+// );
+// }
export const Destinations = () => {
const [selectedPlanets, onAddPlanet] = useState([]);
@@ -29,27 +28,47 @@ export const Destinations = () => {
let numberOfPlanets = 0;
const onAddOrRemovePlanet = (name, index) => {
- // TASK - React 1 week 2
- // Implement this function
- // If you press the "ADD PLANET" the selected planet should display "SELECTED"
- // And the counter should update, how many planets are selected (numberOfPlanets)
- console.log(`You seleceted the following planet: ${name}, with the index of ${index}`);
- }
+ const planetIndex = selectedPlanets.indexOf(name);
+
+ if (planetIndex > -1) {
+ const updatedPlanets = [...selectedPlanets];
+ updatedPlanets.splice(planetIndex, 1);
+ onAddPlanet(updatedPlanets);
+ } else {
+ onAddPlanet([...selectedPlanets, name]);
+ }
+
+ console.log(
+ `You seleceted the following planet: ${name}, with the index of ${index}`
+ );
+ // TASK - React 1 week 2
+ // Implement this function ---- done
+ // If you press the "ADD PLANET" the selected planet should display "SELECTED" ---done
+ // And the counter should update, how many planets are selected (numberOfPlanets) ---done
+ //console.log(`You seleceted the following planet: ${name}, with the index of ${index}`); ---done
+ };
+ numberOfPlanets = selectedPlanets.length;
return (
Travel destinations
Wishlist
- {/* TASK - React 1 week 2 */}
- {/* Display the number Of selected planets */}
- {/* Display the "no planets" message if it is empty! */}
-
No planets in wishlist :(
-
You have {numberOfPlanets} in your wishlist
+ {numberOfPlanets === 0 ? (
+
No planets in wishlist :
+ ) : (
+
You have {numberOfPlanets} planet(s) in your wishlist
+ )}
+
List coming soon after lesson 3!
-
- {/* STOP! - this is for week 3!*/}
+
+ {/* TASK - React 1 week 2 */}
+ {/* Display the number Of selected planets --done-- */}
+
+ {/* Display the "no planets" message if it is empty! ---done--*/}
+
+ {/* STOP! - t
his is for week 3!*/}
{/* TASK - React 1 week 3 */}
{/* Import the AddWishlistItem react component */}
{/* */}
@@ -57,8 +76,11 @@ export const Destinations = () => {
{/* Convert the list, so it is using selectedPlanets.map() to display the items */}
{/* Implement the "REMOVE" function */}
{/* uncomment the following code snippet: */}
+
{/*
Your current wishlist
+
+
{
Possible destinations
{/* TASK - React 1 week 2 */}
- {/* Add all 4 planets! Europa, Moon, Mars, Titan */}
+ {/* Add all 4 planets! Europa, Moon, Mars, Titan ---done--- */}
{/* Use the README.md file for descriptions */}
{/* Create a component, which accepts the following properties: */}
{/* name, description, thumbnail, isSelected, onAddOrRemovePlanet */}
-