Skip to content

Conversation

zmjohnso
Copy link
Contributor

This PR addresses task #954.

The src/hooks/useDisplayMode.ts hook's DisplayMode type was broken up into a Currency type and a simple isPrivate boolean. Doing so simplifies the logic where most of the time, we only care about toggling the currency type. This also greatly cleans up the logic in places like src/components/settings/Settings.tsx, where the separation of types is more apparent. While the individual toggles were separated, there is still a toggleDisplayMode for swapping between the three "display modes" on the landing page. Maybe there is still a cleaner way to do this? Also, the naming conventions could possibly still be improved. I used currency: Currency, but bitcoinUnits: BitcoinUnits might make more sense.

@zmjohnso zmjohnso changed the title 954 separate private mode from display mode chore(v2) - separate private mode from display mode Sep 20, 2025
@zmjohnso zmjohnso changed the title chore(v2) - separate private mode from display mode chore(v2): separate private mode from display mode Sep 20, 2025
@zmjohnso zmjohnso marked this pull request as draft September 20, 2025 21:19
@zmjohnso zmjohnso marked this pull request as ready for review September 20, 2025 21:48
@theborakompanioni
Copy link
Collaborator

LGTM

@theborakompanioni theborakompanioni self-requested a review October 9, 2025 13:19
@theborakompanioni theborakompanioni added the v2 Related to the redesigned v2 release label Oct 9, 2025
@theborakompanioni theborakompanioni merged commit 2cdf61a into joinmarket-webui:v2 Oct 9, 2025
3 checks passed
@zmjohnso zmjohnso deleted the 954-separate-private-mode-from-display-mode branch October 10, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Related to the redesigned v2 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants