Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"extends": [
"airbnb-typescript",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended"
],
"plugins": ["react", "@typescript-eslint", "jest", "import"],
"env": {
"browser": true,
"es6": true,
"jest": true
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"linebreak-style": "off",
"quotes": [2, "single"],
"prettier/prettier": [
"error",
{
"endOfLine": "auto",
"singleQuote": true
}
]
}
}
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*


#es lint
.eslintcache
.eslint-release-info.json
.temp-eslintcache
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"trailingComma": "none",
"endOfLine": "auto"
}

22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Fork this project and send back a pull request.
### Coding Task

1. Display these products https://www.unisport.dk/api/products/batch/?list=179249,179838,174351,180011,180020,178429 in a responsive grid, it has to fit on to mobile and desktop. How much information you show pr product is up to you
2. Sort the products based on discount, lowest discount at the top
3. All prices should be formated in DKK currency
- Simple **React App** which displays products from API in a **responsive grid** for mobile and desktop where products are sorted by lowest discount
- App is using **Typescript**
- To make sure that code is **consistent** and to avoid bugs app uses: Eslint, Prettier, and Airbnb style guide

### What we look for?
### Installation

When we review your pull request we look at how the code has been structured and which libraries you decide to use. There is no right or wrong when it comes to choice in CSS or JavaScript frameworks or libraries
You can clone the repo and run command:

#### How to fork
`$ npm install` from the project root folder

https://help.github.com/articles/fork-a-repo/
If the project will not run automatically you can go to:
http://localhost:3000/

#### How to do a pull-request

https://help.github.com/articles/using-pull-requests/
**Table of Contents**

[TOC]
18 changes: 18 additions & 0 deletions README.old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Fork this project and send back a pull request.

1. Display these products https://www.unisport.dk/api/products/batch/?list=179249,179838,174351,180011,180020,178429 in a responsive grid, it has to fit on to mobile and desktop. How much information you show pr product is up to you
2. Sort the products based on discount, lowest discount at the top
3. All prices should be formated in DKK currency

### What we look for?

When we review your pull request we look at how the code has been structured and which libraries you decide to use. There is no right or wrong when it comes to choice in CSS or JavaScript frameworks or libraries

#### How to fork

https://help.github.com/articles/fork-a-repo/

#### How to do a pull-request

https://help.github.com/articles/using-pull-requests/

Loading