App deployed to vercel click to view
This is a Football Manager app, where a team can be managed, players added, deleted or updated. And a view of the team’s formation is visible with the starters being shown in the field.
- Run npm install to get all libraries used
- Run npm start to run the project
- react-table: "^7.8.0"
- react-router-dom: "^6.3.0"
- classnames: "^2.3.1",
- Editable Team Name
- If the name has not been changed before, the edit icon should be always visible;
- After changing the name once, the icon should only be visible when hovering the name;
- Search Field
- A search bar to filter players by name and/or position;
- The search could filter based on the complete name or a substring;
- It should handle keystrokes:
Enter: Execute the search (same as clicking “search”);Escape(ESC): Cancel the search and clear the criteria;
- After searching, clicking
xshould remove the search (and criteria) and show all results;
- Roster Importer
- Error handling:
- Make sure the file contains no empty values, if one is found, return an error to the user;
- Ensure only .csv files can be used;
- If a valid file is shared, show a summary of counting the total players and count of each positions that would be added if the user accepts;
- Once accepted, the contents of the file should be stored in the application state;
- If there is already a roster added, the import button should change to “Re-Import”
- If used, the state should be cleared and refreshed with the new import;
- Error handling:
- Roster Table
- The Table should contain the data from the application state
- If the state is empty, show a message instead of the table;
- Along with the player name, include the country flag for the player
- You’ll find a column named
Flag Imagewith a path to the required image;
- You’ll find a column named
- For
HeightandWeight, you’ll need to use the numbers to display a more readable value- (i.e. 180 → 1.80 m);
- Each row should have a actions menu, when used there would be the option to edit or delete a players
- When editing, ensure all fields are filled before allowing an edit;
- When deleting, ask if the user is sure before deleting;
- The Table should contain the data from the application state
- Formation Preview
- The 4-3-3 formation should be displayed on the field. Where the players are positioned accordingly.
- For each player, display a circle with their jersey number and the player name;
- The code should check the starters of each position available on the roster:
- Goalkeeper, of which one is required;
- Defender, of which four are required;
- Midfielder, of which three are required;
- Forward, of which three are required;
- There are three conditions to display the formation:
- There is a roster;
- There are enough starters;
- There aren’t too many starters;
- If any of the conditions above are not met, show a respective message instead of the preview
- See the messages in Figma;
- The 4-3-3 formation should be displayed on the field. Where the players are positioned accordingly.
- Player Details
- The user should see details about the players in the formation, by default the goalkeeper should be shown;
- The user could then click on a player to see their details;
- In the player detail, show the information and stats related to the player;
- For Goalkeepers the stats are
Clean SheetsandSaves - For the other positions:
GoalsandAssists - All positions have
AppearanceandMinutes Played
- For Goalkeepers the stats are