- Build an application that displays a list of categories and nominees. Please follow the design in the wireframe below. Run the following commands to start the application:
Install dependencies
npm i
Run the application
npm run dev
- Use the React
useEffect
hook to fetch the ballot data from the provided API (http://localhost:3000/api/ballots
), and save it to state by using the ReactuseState
hook.
Get example of ballot data
curl -X GET \
'http://localhost:3000/api/ballots' \
-H 'Accept: */*'
-
When you click on a nominee, we should highlight the nominee card and save the selections using the React
useState
hook. A user can only select one nominee per category, and we should be able to see all of their selections highlighted. The selected nominee card should follow the style guides below. -
Make the layout responsive with at least one breakpoint (your choice as to how it looks on a smaller screen width).
-
Once the user is finished making their selections, they can click on a submit button that displays a results modal screen. A user can dismiss the modal by clicking on the close button (follow the wireframe below).
Requirements:
-
All navigation should happen in the same page
-
Demonstrate use of React hooks
-
Demonstrate knowledge of component modularization
-
Utilize CSS to create the layout of the page. Add hover styles to the items the user is interacting with.
-
Create components as you feel is best suited for your solution
Wireframes
Bonuses
-
Make it pretty
-
Make it accessible
-
Add unit tests
Styling Guidelines
- Use the “Roboto” Google font
- Use the following colors
Good luck and if you have any questions, please reach out to us!
TEST-INSTRUCTIONS
Configure Environment
Clone this repo using git clone
After clone this repo, install packages using npm install
or yarn
How to install this app
Run command next dev
How to use this app
-
Select items you want to select
-
Click submit button at the bottom right of the page
You will see the modal and can see the items you selected