Here is the working example
Implement the App with 2 pages and ability to select a person in the table.
- Create the
HomePageavailable at/with just a titleHome Page - Create the
PeoplePageavailable at/peoplewith a titlePeople Page - Use Navigate component to redirect from
/hometo/;- add
replaceattribute not to save/homeURL in the browser history and avoid navigation loop when you press browserGo backbutton.
- add
- Implement
NotFoundPagewith a titlePage not foundthat is shown for all the other URLs; - Add the
Navbarwith 2 linksHomeandPeople. Active one should have thehas-background-grey-lighterclass; - Use
HashRouterto be able to share a link to any page on Github pages; - Fetch
peoplefrom the API whenPeoplePageis opened; - Pass
peopletoPeopleTablecomponent and render as a table (see the given markup); - Make each name in the table a link a to
/people/:slug(including mother and father)- create the
<PersonLink person={person} />and use it for all existing people; - add the
has-text-dangerclass for women names; - if there is no person with a given name among the people just keep the name as a text (not a link);
- if the motherName or fatherName is empty put
-to the table
- create the
- Highlight the row of the selected person with the
has-background-warningclass;
- Implement a solution following the React task guideline.
- Use the React TypeScript cheat sheet.
- Open one more terminal and run tests with
npm testto ensure your solution is correct. - Replace
<your_account>with your Github username in the DEMO LINK and add it to the PR description.