Skip to content

Sundaybrian/react-resort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Resort

22/04/2020

Description

This is a beach resort created in react that displays all the rooms in this make belief resort.Users can view rooms available and filter by various criterias.

Setup/Installation Requirements

  • $ git clone react-resort
  • $ cd react-resort
  • $ npm install to install all dependencies
  • $ npm start to launch the application
  • open localhost:3000 to view the app
  • navigate to roomContext and paste for the following to be able to use the local data.js file
    getData = () => {

      let rooms = this.formatData(items);
      let featuredRooms = rooms.filter((room) => room.featured === true);
      let maxPrice = Math.max(...rooms.map((room) => room.price));
      let maxSize = Math.max(...rooms.map((room) => room.size));

      this.setState({
        rooms,
        featuredRooms,
        maxPrice,
        price: maxPrice,
        maxSize,
        sortedRooms: rooms,
        loading: false,
      });
  };

  componentDidMount() {
    // fetch date
    this.getData();
  }

Known Bugs

  • No known Bugs

Technologies Used

  • React
  • Netlify
  • Contentful
  • Styled components

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

License

MIT (c) 2019 Brian Sunday

About

Resort Website in react, using contentful as the headless cms, deployed on netlify

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published