Code Test Address: https://blockchaintech-code-test.herokuapp.com/
- Download the zip file or git clone + address;
- Open the folder with VS code;
- Install all dependencies by running npm i;
- Run npm start to open a local development environment.
- There are two pages 'Trades' and 'Withdraws', which can be found on the top of the page. 'Trades' is the default page. Click 'Withdraws' will navigate to 'Widthraws' page;
- On each page, there is a 'Form' with a 'search' and 'reset' button. A result table is shown on the bottom of the page with a pagination. You can change pages and page sizes based on your preferences.
- Users' result will not be lost even if you refresh the page
- Reading and understanding all requirements: 20 mins;
- Testing the two APIs with postman: 40 minutes;
- Building the app:2 hours;
- Testing the app:40 mins;
- Polish and Beautify the app: 40 minutes;
Total time taken: 4 hours and 20 minutes
- I used the newest react edition 16.8.6 with hook. No Class is used in this app.
- As this is a very simple app, I did not use redux to manage global state.
- I used react router for routing.
- In CSS, I used bootstrap css and element-UI for react. Styled-component is slightly used in Header.js.
- In network request, I used axios. All requests are cancelable to prevent memory leak when mount and unmount components but network requests are still ongoing.
- Persistance result is achived by storing data in localStorage.
There seems to be a problem with 'withdraws' api.
When I test this api using postman with 'filter[createdAt][gte]=2019-02-13' and 'filter[createdAt][Ite]=2019-02-14' I should get 3 results. However, this api always returns 40 results regarless of the values in this filter 'filter[createdAt][gte]=2019-02-13' and 'filter[createdAt][Ite]=2019-02-14'.
I also tried to change the format to 'filter[createdAt][gte]=2019-02-13' and 'filter[created][Ite]=2019-02-14' . It still was not working.
Therefore the function to 'Search by range: Created at' cannot be completed.