Git Product home page Git Product logo

wolt-summer-2020's Introduction

Wolt summer 2020 assignment

wolt summer 2020 frontend assignment (repo) there is a list of restaurants in json file the task is show this restaurants in a respinsive fashion and make them sortable for end-users. demo

how to use

1- clone the repo

git clone https://github.com/hamidjafari/wolt-summer-2020.git
cd wolt-summer-2020

2- install dependencies

npm install

3- make sure gatsby installed in your system

npm  install -g gatsby-cli

4- run gatsby dev server

gatsby develop

5- open in browser ( default port is 8000 )

http://localhost:8000

how it works

lets break it in some steps

  1. load json data in gatsby's graphql so that we can get it in our pages or components and apply some plugins on data for optimizing and ...

    • install these plugins gatsby-source-filesystem gatsby-transformer-json
    • load plugins in gatsby-config.js
  2. for optimizing restaurant image with gatsby plugin as the image url came from the remote server, first we have to download image then load it as node in graphql

    • in gatsby-node.js use the createRemoteFileNode method from source plugin for loading images as node in graphql Img___NODE
    • add gatsby image optimzer plugins gatsby-transformer-sharp gatsby-plugin-sharp which can read image nodes and make optimized images for us to use
  3. load restaurants array in index page and show them in cards

  4. create a custom hook for sorting restaurants in useSortedRestaurants.js

wolt-summer-2020's People

Contributors

hamidjafari avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.