Skip to content

refactor: simplify client/main#64

Merged
alukach merged 1 commit intomainfrom
refactor/simplify
Mar 13, 2026
Merged

refactor: simplify client/main#64
alukach merged 1 commit intomainfrom
refactor/simplify

Conversation

@alukach
Copy link
Member

@alukach alukach commented Mar 13, 2026

What I'm changing

In this PR, we attempt to reduce lines of code and simplify the codebase for the sake of legibility of client/src/main.tsx

How I did it

  1. Remove composer abstraction. To the best of my knowledge, this is non-idiomatic, removes type-safety, and works against the principle of least astonishment
  2. Remove the .last() prototype for arrays. I was unable to find its usage anywhere.
  3. Remove the fetch overload. The content-type bug was resolved in developmentseed/stac-react@26b7636

@alukach alukach requested review from AliceR and danielfdsilva March 13, 2026 04:26
Copy link
Member

@AliceR AliceR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @alukach, this definitely looks like a very good simplification! I did not run the code, but looks a straightforward change.
Not sure about that GET header removal, but the temporary promise in line 93 was authored on Jul 4, 2025... shouldn't we update stac-react to v1, anyways?

@alukach alukach merged commit e5b16b9 into main Mar 13, 2026
4 checks passed
@alukach alukach deleted the refactor/simplify branch March 13, 2026 18:52
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.

2 participants