From 85d1d291c335ea89d480d1a9c8439709f241f9e2 Mon Sep 17 00:00:00 2001 From: Sumanth U <157620444+Sumanth077s@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:14:00 +0530 Subject: [PATCH] Update Tours.js --- 02-tours/final/src/Tours.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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