- Clone this repository to your machine.
- Do not change the repository structure. If you change it, let us know why in the README.
- Write your code in a clear and professional manner. Avoid using any sketchy or poorly written code as it will not allow us to accurately evaluate your skills.
- In case of any questions regarding the challenge, please, contact a member of the hiring team who shared this challenge with you.
This is a minimal Create React App SPA that includes:
- A theme for styling.
- Pre-built components for you to use in the project. You should be able to locate them.
- A fake REST API for data fetch.
- The challenge must be implemented using TypeScript.
- Data fetching must be handled using Redux.
- Any open-source library can be used, except for Redux Toolkit.
- The use of Redux Toolkit is not allowed. This is to evaluate the candidate's understanding of the building blocks of Redux.
- Expected completion duration: about 3 hours.
- Pressing the
RETRY
button will retry the fetching.
- Pressing the
EDIT
button opens a browser prompt with the prompt messageNew Tournament Name:
, an input field with the current tournament name as pre-filled value and buttonsCancel
to cancel andOK
to confirm. - The tournament name must contain only Latin letters, numbers, and spaces, not an empty string or only spaces.
- When
OK
is selected, the tournament name updates immediately in the UI through an "optimistic update" with rollback, without any loading indicators.
- Pressing the
DELETE
button opens a browser prompt with the messageDo you really want to delete this tournament?
and the buttonsCancel
to cancel andOK
to confirm. - When
OK
is selected, the tournament is deleted immediately in the UI using an "optimistic delete" with rollback, without any loading indicators.
Requirements:
- The search function should call the endpoint with the search term, rather than searching through local data.
- The search should trigger on user input, not by pressing the Enter key.
- Pressing the
RETRY
button retries the data fetch.
- Add a button labeled
CREATE TOURNAMENT
.
- Pressing the
CREATE TOURNAMENT
button opens a browser prompt with the messageTournament Name:
, an input field to enter the tournament name, and the buttonsCancel
to cancel andOK
to confirm. - The tournament name must contain only Latin letters, numbers, and spaces, not an empty string or only spaces.
- When
OK
is selected, the tournament is created on the fake REST API and at the start of the tournament list without any loading indicators.
- Tournaments have a border radius of
4px
. - The tournament name uses the heading size
h6
. - The
Start
date is displayed in the formatDD/MM/YYYY, HH:mm:ss
(en-GB
locale). - The horizontal spacing between the
EDIT
andDELETE
buttons is8px
. - The horizontal and vertical spacing between each tournament is
24px
.
-
Examples of the expected layout on different screen sizes are provided:
-
iPhone 12 Pro Max (428x926):
- iPad (768x1024):
- Laptop 13" (1280x800):
- iMac Retina 27" (2560x1440):
- Create a
ZIP
file with your solution. - Include the .git folder to the
ZIP
file to facilitate code review. - Send the
ZIP
file to the recruiter who provided this challenge. - Do not include the
node_modules
folder in theZIP
file.