I had 2 weeks to complete this task.
Also one of the recruiters mentioned to me in the DM that the project doesn't have to be exactly as specified in the task. He also said that the more advanced the project the better.
In short I had to:
- Fetch data about Nobel Prizes from APi.
- At the home page there should be a year dropdown/select.
- Under it there should be a button that is disabled until a year has been chosen.
- On button click user should be routed to /rewards/:year
- On /rewards/:year there should be a table with year, category, date in DD.MM.YYYY format and prize amount.
Additional tasks were:
- On the home page add a language selector and allow the user to pick from English/Norwegian/Swedish. Changes should be shown in the table on /rewards/:year.
- Table sorting and filtering.
- UI. MUI was recommended.
I also wrote and sent markdown file that was required.
Make sure that you have npm installed.
- Go to folder in which you want to download this project.
- Write in terminal:
git clone https://github.com/karmatys8/BIT_WEB_recruitment_task.git
- Write in terminal:
cd BIT_WEB_recruitment_task
- Write in terminal:
npm install
- Write in terminal:
npm start
or bothnpm run build
andserve -s build
After those steps the app will be available here.
I wasn't accepted.
Reason: 'As many as 18 candidates applied for the project, so unfortunately "very good work" wasn't enough.' - quote by recruitment team
- Material UI
- React router dom
- React i18next
- Better understanding of types in TS
- There is a Warning: Cannot update a component (
MyAppBar
) while rendering a different component (SharedLayout
). To locate the bad setState() call insideSharedLayout
. To be frank I didn't have time to fix it. My best assumption is that when isDarkMode state updates MUI Switch updates and then SharedLayout cannot update because MyAppBar component hasn't re-rendered yet. Website still works but it is a bad practice. - There is a light theme flashing while dark-mode is activated. It happens because dark mode logic happens after the html element is already loaded.
- I assumed that I was supposed to build a custom Table so I didn't use Data Grid. Which has built in sorting and filtering which obviously are more optimized than my code.
- User preferred color scheme is not taken into account. It could be done with useMediaQuery('(prefers-color-scheme: dark)').
- Error Page could look nicer.
- When not available year is typed in there should be some placeholder/info.
- Repo's architecture. For instance Year.tsx is clearly too large and src is kinda thrashed.
- Some variables should be renamed.
- Title, icon etc. are from template and should be customized.