This is a Next.js project that uses Typescript, and Hasura.
- Clone the repo locally.
- Install all necessary packages by running
yarn
- Run
yarn dev
to get your dev environment up and running
Open http://localhost:3000 with your browser to see the result.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
Technical Assignment Task:
Objective: Fix the bugs related to updating the datatable after adding a new target through a modal and the duplication of data when clicking the sync target button.
Steps to follow:
- Fork the repository from the original repository.
- Clone the forked repository to your local machine.
- Set up the development environment if necessary.
- Analyze the codebase to identify the cause of the bugs.
- Make necessary changes to fix the bugs while minimizing changes that may impact existing functionality.
- Test the modified code to ensure that the bugs are resolved and there are no regressions.
- Commit the changes to your forked repository, providing meaningful commit messages.
- Push the changes to your forked repository.
- Share the link to your forked repository with the hiring team for validation.
Bug 1: DataTable not updating after adding a new target through modal:
- Analyze the code related to adding new targets and updating the DataTable.
- Identify any missing or incorrect logic that prevents the DataTable from being updated.
- Make the necessary changes to ensure that the DataTable is updated with the new data after adding a target through the modal.
- Test the functionality thoroughly to confirm that the DataTable is correctly updated.
Bug 2: Duplication of data when clicking the sync target button:
- Review the code associated with the sync target button functionality.
- Identify the reason behind the duplication of data when the button is clicked.
- Modify the code to prevent data duplication while maintaining the desired synchronization functionality.
- Test the synchronization process to verify that the duplication issue is resolved.
Additional guidelines:
- Ensure that your changes follow the existing coding style and conventions used in the codebase.
- Document any significant changes or assumptions made during the bug fixing process.
- Feel free to refactor or optimize the codebase where necessary, but be cautious not to introduce new bugs.
- Test the application thoroughly after making changes to ensure that all functionalities are working as expected.
- Provide a detailed README file that includes instructions for setting up the project, running the application, and any other relevant information.
Please note that the provided video link should be reviewed to gain a better understanding of the bugs and their context. https://youtu.be/sOKjmCSrPI8 https://youtu.be/1FC2kM2nNXw
Get your NEXT_PUBLIC_ACCESS_TOKEN by following this instruction
- Copy token value and paste it to NEXT_PUBLIC_ACCESS_TOKEN
- If issue persist please reachout to my email.