diff --git a/19-stock-photos/final/src/Photo.js b/19-stock-photos/final/src/Photo.js index 7262d742f..ed620f97b 100644 --- a/19-stock-photos/final/src/Photo.js +++ b/19-stock-photos/final/src/Photo.js @@ -1,25 +1,34 @@ import React from 'react' const Photo = ({ - urls: { regular }, - alt_description, - likes, + urls: { regular }, // Destructuring the 'regular' URL from 'urls' for the image source + alt_description, // Destructuring the 'alt_description' for the alt text of the image + likes, // Destructuring the number of 'likes' for the photo user: { - name, - portfolio_url, - profile_image: { medium }, + name, // Destructuring the 'name' of the user who uploaded the photo + portfolio_url, // Destructuring the user's 'portfolio_url' for the link to their profile + profile_image: { medium }, // Destructuring the 'medium' profile image URL of the user }, }) => { return ( -
- {alt_description} +
+ {/* The photo article containing the image and the user info */} + {alt_description} + {/* Display the image using the 'regular' URL with the 'alt_description' as alt text */} +
+ {/* Div containing photo information */}
-

{name}

+

{name}

+ {/* Display the user's name */}

{likes} likes

+ {/* Display the number of likes */}
+ + {/* Link to the user's portfolio */} + {/* Display the user's profile image */}