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

Refactor globalThis usage by moving functions to utils.js #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

friuns2
Copy link
Owner

@friuns2 friuns2 commented Jun 29, 2024

Refactors global function usage by introducing a utils.js module and updating component imports.

  • Adds utils.js with updateLocation, calculateDirections, and clearMarkers functions, exporting them for use across the application.
  • Updates Vue components (AttractionDetails.vue, LocationModal.vue, AttractionList.vue, MapView.vue, and pages/index.vue) to import and use functions from utils.js instead of accessing them through globalThis.
  • Removes globalThis references in the updated components, replacing them with the imported functions from utils.js.
  • Maintains functionality while improving code organization and modularity by centralizing common functions used across multiple components.

For more details, open the Copilot Workspace session.

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