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

eliminated fetchprojectData in the webcomponent and now uses the fetc… #35

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

Conversation

sarah-fidahussain-SLU
Copy link
Collaborator

@sarah-fidahussain-SLU sarah-fidahussain-SLU commented Nov 11, 2024

Fixes #31

What was changed: There was a separate fetchData function and a fetchData function built in the web-component. To maintain code reusability I eliminated the fetchData function that was built in the web-component and used the existing fetchData function that was separate.
Why was it changed: This was to eliminate code duplicates and reduce confusion on which one to use.
How was it changed:

  • web-component.js: Eliminated the fetchData function that was built-in and it is now more stream-lined by using the imported function.

Copy link
Collaborator

@Matthew-Clendenning Matthew-Clendenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job reducing redundancy; however, it seems like this file is a repeat of what fetchProjectData is doing already. Maybe we should remove one of the two files.

@MutyaSowmya123
Copy link
Collaborator

Good job reducing redundancy; however, it seems like this file is a repeat of what fetchProjectData is doing already. Maybe we should remove one of the two files.

Yes, check for the functionality that is being repeated and delete one of the file. Implementing (if required ) some things from one of the files.

Copy link
Collaborator

@MutyaSowmya123 MutyaSowmya123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for the functionalities that are implemented by both the files and ensure the required once are retained.

@sarah-fidahussain-SLU
Copy link
Collaborator Author

I have deleted the other fetchProjectData file as that had outdated and hard-coded tokens.

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.

Use fetchprojectData.js in web-component.js to maintain code reusability
3 participants