Skip to content

yamilmsilva/airbnb-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airbnb Clone

This project was bootstrapped with Create React App.

Table of contents

Overview

Requirements

  • Data array in a separate .js file
    • Title, description, price, cover image, rating, review count, location, open spots
  • Use .map() and props
  • Style & polished
  • Mobile designed

Screenshot

localhost_3000_(iPhone 12 Pro)

Links

Getting Started with Create React App

This project was bootstrapped with Create React App.

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • JavaScript
  • React.JS
  • Flexbox

What I Learnt

// required to display local imgs in src folder
<img src={require(`../images/${props.img}`)} />
// badgeText has no value because I need in the conditional rendering

let badgeText;
if (props.openSpots === 0) {
  badgeText = "SOLD OUT";
} else if (props.location === "Online") {
  badgeText = "ONLINE";
}

// Conditional rendering
// If badgeText has something assigned (means badgeText is truthy) card--badge div will be displayed corrisponding badgeText

{
  badgeText && <div className="card--badge">{badgeText}</div>;
}

Author

  • Yamil Silva

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published