Skip to content

Instantly share code, notes, and snippets.

@covelitein
Created March 17, 2023 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save covelitein/6f2867f66666488462ac9d630a7b77c1 to your computer and use it in GitHub Desktop.
Save covelitein/6f2867f66666488462ac9d630a7b77c1 to your computer and use it in GitHub Desktop.
import Card from './Card'
const CardCollection = ({ appartments }) => {
return (
<div className="py-8 px-14 flex justify-center flex-wrap space-x-4 w-full">
{
appartments.length > 0 ?
appartments.map((room, i) =>
<Card appartment={room} key={i}/>
)
: 'No appartments yet!'
}
</div>
)
}
export default CardCollection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment