Skip to content

[Modifications] Consolidate the two location services #1023

Description

@RUKAYAT-CODER

Overview

src/services/location.ts and src/services/locationService.ts both exist, alongside src/store/locationStore.ts, src/hooks/useLocation.ts (7 type errors) and src/utils/geoUtils.ts. There are also two test files: src/__tests__/services/locationService.test.ts and src/services/__tests__/locationService.test.ts — themselves duplicated across two directory conventions. docs/location-strategy.md describes one design.

Specifications

Features:

  • One location service
  • One test location, following the repository convention
  • The documented strategy matching the implementation

Tasks:

  • Diff location.ts against locationService.ts and identify the live implementation
  • Merge unique logic and delete the redundant module
  • Consolidate the two test files
  • Fix the seven type errors in src/hooks/useLocation.ts
  • Update docs/location-strategy.md

Impacted Files:

  • src/services/location.ts
  • src/services/locationService.ts
  • src/hooks/useLocation.ts
  • src/store/locationStore.ts
  • docs/location-strategy.md

Acceptance Criteria

  • One location service remains
  • Location tests live in one directory
  • The hook type-checks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions