+
+ );
+ };
+
\ 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..9e9df7b6
--- /dev/null
+++ b/app/about_us/OurValues.js
@@ -0,0 +1,20 @@
+const OurValues = () => {
+ const values = [
+ { title: "Integrity", description: "We uphold the highest standards of honesty and ethics in all we do." },
+ { title: "Innovation", description: "We embrace creativity and strive for continuous improvement." },
+ { title: "Collaboration", description: "We work together to achieve more than we could alone." },
+ { title: "Customer Focus", description: "Our customers are at the center of everything we do." },
+ ];
+ return (
+
+
+ {values.map((value, index) => (
+
+
{value.title}
+
{value.description}
+
+ ))}
+
+
+ );
+ };
\ No newline at end of file
diff --git a/app/about_us/Taylor-Lee-scaled.jpg b/app/about_us/Taylor-Lee-scaled.jpg
new file mode 100644
index 00000000..a031576e
Binary files /dev/null and b/app/about_us/Taylor-Lee-scaled.jpg differ
diff --git a/app/about_us/page.js b/app/about_us/page.js
index 880ec427..8019e203 100644
--- a/app/about_us/page.js
+++ b/app/about_us/page.js
@@ -1,41 +1,7 @@
import styles from './page.module.css';
-
-// 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 (
-
+);
export const Destinations = () => {
- const [selectedPlanets, onAddPlanet] = useState([]);
+ const [selectedPlanets, setSelectedPlanets] = useState([]);
- let isPlanetSelected = false;
- let numberOfPlanets = 0;
+ const onAddOrRemovePlanet = (name) => {
+ setSelectedPlanets((prevPlanets) =>
+ prevPlanets.includes(name)
+ ? prevPlanets.filter((planet) => planet !== name)
+ : [...prevPlanets, name]
+ );
+ };
- 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 removeFromWishlist = (name) => {
+ setSelectedPlanets((prevPlanets) => prevPlanets.filter((planet) => planet !== name));
+ };
+
+ const planets = [
+ { name: "Europa", thumbnail: "/destination/image-europa.png", description: "Lorem ipsum..." },
+ { name: "Moon", thumbnail: "/destination/image-moon.png", description: "Lorem ipsum..." },
+ { name: "Mars", thumbnail: "/destination/image-mars.png", description: "Lorem ipsum..." },
+ { name: "Titan", thumbnail: "/destination/image-titan.png", description: "Lorem ipsum..." }
+ ];
return (
Travel destinations
+
+ {/* Wishlist Section */}
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
- List coming soon after lesson 3!
-
- {/* STOP! - this is for week 3!*/}
- {/* TASK - React 1 week 3 */}
- {/* Import the AddWishlistItem react component */}
- {/* */}
- {/* TASK - React 1 week 3 */}
- {/* Convert the list, so it is using selectedPlanets.map() to display the items */}
- {/* Implement the "REMOVE" function */}
- {/* uncomment the following code snippet: */}
- {/*
-