Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task solution Jakub Sepetowski #4

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

sepetowski
Copy link

@sepetowski sepetowski commented Dec 30, 2023

Hi, This is my solution for given task

As per the instructions, I created a method that allows merging json and yaml files into one sorted array. I am not sure if I understood the requirements correctly, but I encapsulated the entire logic of reading from files within the method from the library. In the endpoint, I only invoke it with the appropriate data. I retrieve data from the endpoint using React Query and handle exceptions. Additionally, I used Zod to check if the files from which I read data have the correct format to avoid unexpected errors.

For styling the application, I used the Shadcn library and implemented theme switching using Next Themes.

I also added tests to the application.

List of tools I used:

  • React Query
  • Zod
  • Yaml
  • Shadcn
  • Next Themes
  • Jest
  • React Testing Library
  • Prettier
  • Tailwind CSS with the scrollbar extension
  • React Hook/Media Query

…d YAMl files

Introduce 'Professions' enum (astronaut, doctor, engineer).
Define 'CrewMember', 'JsonCrewMember', and 'YamlCrewMember' types.

Implement file reading functions:
- 'readJsonCrewMember' for JSON files.
- 'readYamlCrewMember' for YAML files.
- Introduced a new data type for the received API information.
- Moved the provider from the layout to _app.
… page, throwing a 404 error if it's invalid, implemented data retrieval from the API based on the provided page parameter, improved the layout, introduced a 404 error page
- Enhanced the overall layout for an improved user interface.
- Added the functionality to dynamically display crew members in card format.
- Removed unnecessary enum Professions
- Fixed data attributes for tests
- Added tests for components: crewMembers, crewMember, and CrewInformationLoading
Implemented pagination rendering check to determine whether rendering is necessary, and added corresponding tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant