https://github.com/smakss/sainsbury
Sainsbury's coding challenge
https://github.com/smakss/sainsbury
Last synced: about 1 year ago
JSON representation
Sainsbury's coding challenge
- Host: GitHub
- URL: https://github.com/smakss/sainsbury
- Owner: SMAKSS
- Created: 2023-01-08T22:57:16.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-08T22:57:22.000Z (over 3 years ago)
- Last Synced: 2025-02-15T11:45:45.816Z (over 1 year ago)
- Language: JavaScript
- Size: 201 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [Sainsbury's code challenge](https://jsainsburyplc.github.io/front-end-test/)
This is a single-page application consisting of two views the navbar and the
products view.
- The navbar contains a single basket button which is responsible for showing
the user's active basket based on the products the user adds.
- The products view contains a bunch of products fetched from the provided
end-point and shows all the product details and a button to add them to the
basket.
> **Note:** For the sake of time, there is no quantity base for the products,
> and users can only add them once to the basket.
---
**Tests:** I liked to write tests for each component and its functionality, but
there was not much time to do so!
## Run app locally
- Install all the dependencies by using on of the following commands:
Yarn:
```bash
yarn
```
or
```bash
yarn install
```
NPM:
```bash
npm i
```
or
```bash
npm install
```
- Now you can run it locally with on of the following commands:\
Yarn:
```bash
yarn start
```
NPM:
```bash
npm run start
```
**NOTE:** There are two other useful commands:
- Formatting with Prettier
Yarn:
```bash
yarn format
```
NPM:
```bash
npm run format
```
- Linting with ESlint
Yarn:
```bash
yarn lint
```
NPM:
```bash
npm run lint
```