This is FE test for DevoTeam.
- run
yarn
to install all needed packages first - run
yarn start
to start app - run
yarn test
to run unit test
Features (mandatory & extraπ)
- β Fetch data from api, by default, it will render the list view. Results are sorted by asc by default.
- β If you click the sort-icon, results will be sorted by desc and the icon will also change to a different one to indicate that.
- β If you click view-switch-icon, you will toggle between list-view and thumnail-cards-view. Again, the icon will change correspondingly.
- β If you type anything, search results will update.
- π Add clear input button.
- π When there is no search result, show some text to let the user know, instead of a blank page.
- π When there is an error (when fetching data from api), the user will see an error page with error message there.
- β Two different layout will be responsive, to implement that, I used both grid and flex.
- β Follow design, use correct font-family and etc.
- β Add unit test for all functionality
- π Add basic skeleton while loading
Can be improved/discussed:
- Can store results in sessionStorage when we fetch data for the first time to avoid sending multiple requests when we refresh the page;
- Can add more hover/fancy effect to desktop version;
- Title's position on desktop and how it should look like on medium size screen, I made some tiny adjustment.
- Can add more accessibility later on
Videos: