diff --git a/02-tours/final/src/Tours.js b/02-tours/final/src/Tours.js index 36ae9a2eb..7188eafc2 100644 --- a/02-tours/final/src/Tours.js +++ b/02-tours/final/src/Tours.js @@ -1,19 +1,29 @@ -import React from 'react'; -import Tour from './Tour'; +import React from 'react'; // Importing React library +import Tour from './Tour'; // Importing the Tour component + +// Tours component receives a list of tours and a function to remove a tour as props const Tours = ({ tours, removeTour }) => { return (
+ {/* Section header */}

our tours

-
+
{/* Decorative underline */}
+ {/* Iterating through the tours array and rendering a Tour component for each tour */} {tours.map((tour) => { - return ; + return ( + + ); })}
); }; -export default Tours; +export default Tours; // Exporting the Tours component