refactor(frontend): deduplicate API base URL configuration#32
Open
abhiram-tekulapalli wants to merge 1 commit into
Open
refactor(frontend): deduplicate API base URL configuration#32abhiram-tekulapalli wants to merge 1 commit into
abhiram-tekulapalli wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor frontend authentication pages to use shared API base URL
Reviewer: @handle
Type:
[ ] Feature[ ] Bug Fix[x] Refactor[ ] Docs/Config[ ] HotfixBreaking change?
[ ] Yes[x] NoSummary
This PR removes duplicated
BASE_URLdeclarations across the frontend authentication pages and replaces them with the sharedBASE_URLexported fromfrontend/lib/api/client.ts.By centralizing the API base URL configuration, this refactor reduces code duplication, improves maintainability, and ensures future API endpoint changes only need to be made in one place. No functional behavior is intended to change.
Rough Example / Context
Before
The same configuration was duplicated across multiple authentication pages.
After
All authentication pages now use the shared configuration from a single source.
How to test locally
Verify that:
BASE_URL.Checklist
Always
console.log, or debug artifacts left in.envFrontend
Backend / API
Docs / Config
Screenshots (required for any UI change)
N/A – This PR does not introduce any visible UI changes.
Env vars added or changed (if any)
None.
AI pre-review
What it flagged: N/A
What I fixed: N/A
What I pushed back on (and why): N/A
Anything the reviewer should know
This is a refactoring-only change. No functional behavior is intended to change.
Validation completed:
npm run lint(existing repository warnings only; no new lint errors)npx tsc --noEmitnpm run build