Task
Replace the duplicated base URL logic in churchtools.ts with the centralized getChurchtoolsBaseUrl() function.
Files to Update
- src/services/churchtools.ts:
- Line 197-202:
getGroupUrl() function
- Line 207-211:
getAppointmentUrl() function
Current Pattern (Duplication)
const churchtoolsBaseUrl = import.meta.env.DEV
? import.meta.env.VITE_BASE_URL
: window.location.origin
New Pattern (Centralized)
const churchtoolsBaseUrl = getChurchtoolsBaseUrl()
Why
- Avoids code duplication
- Ensures consistency across the codebase
- Makes maintenance easier (change once, applies everywhere)
- Already documented in AGENTS.md
Related
- New function added in: src/services/churchtools.ts (line 7-9)
- See: AGENTS.md Base URL Pattern section
Task
Replace the duplicated base URL logic in churchtools.ts with the centralized
getChurchtoolsBaseUrl()function.Files to Update
getGroupUrl()functiongetAppointmentUrl()functionCurrent Pattern (Duplication)
New Pattern (Centralized)
Why
Related