Created
August 4, 2021 13:33
-
-
Save hieptl/7e42854b1553b647c817761ebf00ed96 to your computer and use it in GitHub Desktop.
Stories Component - Facebook Clone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import custom components. | |
import StoryCard from "./StoryCard"; | |
const stories = [ | |
{ | |
name: "Bill Gates", | |
src: "https://links.papareact.com/4u4", | |
profile: "https://links.papareact.com/zvy", | |
}, | |
{ | |
name: "Elon Musk", | |
src: "https://links.papareact.com/4zn", | |
profile: "https://links.papareact.com/kxk", | |
}, | |
{ | |
name: "Jeff Bezoz", | |
src: "https://links.papareact.com/k2j", | |
profile: "https://links.papareact.com/f0p", | |
}, | |
{ | |
name: "Mark Zuckerberg", | |
src: "https://links.papareact.com/xql", | |
profile: "https://links.papareact.com/snf", | |
}, | |
{ | |
name: "Bill Gates", | |
src: "https://links.papareact.com/4u4", | |
profile: "https://links.papareact.com/zvy", | |
}, | |
]; | |
function Stories() { | |
return ( | |
<div className="story__container"> | |
{stories.map((story, index) => ( | |
<StoryCard key={index} name={story.name} src={story.src} profile={story.profile} /> | |
))} | |
</div> | |
); | |
} | |
export default Stories; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment