Fork or clone this repo (a simple create-react-app extended with json-server and some Cleo-specific goodies)
Install dependencies via yarn (or npm)
Run yarn start to start the dev server
Run yarn api in a different terminal to start the json-api server
The Task
Create a Tabs component that allows multiple pages to be switched between.
One tab should show a list of bills. These can be found at http://localhost:3002/bills/. Bills have a flag isBill set to true.
Another tab should show a list of transactions which are potential bills. These can also be found at http://localhost:3001/bills/. Potential bills have a flag isBill set to false.
Under each bill row for both lists, should be a hidden list of transactions for that bill. This should show when the bill row is clicked.
Under the name of each bill should show a count of the transactions for it
Add an action to the bills tab for each bill called "remove bill" which updates the relevant bill's isBill flag to false. You can use a PATCH request to http://localhost:3002/bills/:id using the id of the bill to update the bill resource.
Add an action to the potential bills tab for each potential bill called "Add as bill" which updates the relevant bill's isBill flag to true.
After each action, the lists should reflect the changes.
Notes
Please aim to spend 2-3 hours completing this task
Feel free to use state management tools, and think about how the application might be testable
Style the components however you see fit, SASS, PostCSS or maybe even CSS in JS
The API contains other data, feel free to use this creatively if you have the time