Skip to content

[Frontend] Remove dead API_BASE_URL in lib/dashboard.ts (declared but never used) #621

@ogazboiz

Description

@ogazboiz

Join the discussion on Telegram

Why this matters

frontend/src/lib/dashboard.ts line 46:

const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || \"http://localhost:3001/v1\";

This module-level constant is never referenced anywhere in the file — fetchStreams calls getStreamsEndpointCandidates() (from lib/api/_shared.ts) instead. The dead constant is misleading because each API_BASE_URL in this codebase has a slightly different fallback URL (http://localhost:3001, http://localhost:3001/v1) and it's not obvious which is real.

Acceptance criteria

  • Delete the unused API_BASE_URL declaration at line 46
  • Run lint to confirm no other references

Files to touch

  • frontend/src/lib/dashboard.ts (line 46)

Out of scope

  • Consolidating the four different API_BASE_URL fallbacks across the codebase (separate cleanup)

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendFrontend related tasksgood first issueGood for newcomersrefactorRefactoring existing code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions