Skip to content

Extract Settings screen logic into useSettingsScreen hook#41

Open
Arome8240 wants to merge 1 commit intoTrustUp-app:mainfrom
Arome8240:feature/extract-settings-hook
Open

Extract Settings screen logic into useSettingsScreen hook#41
Arome8240 wants to merge 1 commit intoTrustUp-app:mainfrom
Arome8240:feature/extract-settings-hook

Conversation

@Arome8240
Copy link
Copy Markdown

  • Created hooks/settings/use-settings-screen.ts with typed interfaces
  • Moved preferences state and togglePref handler from SettingsScreen
  • Refactored SettingsScreen to be presentation-only component
  • Added comprehensive tests for hook logic
  • Preserved all toggle behavior, animations, and accessibility labels
  • Follows repository hook patterns (typed returns, useCallback, JSDoc)

Resolves #36

- Created hooks/settings/use-settings-screen.ts with typed interfaces
- Moved preferences state and togglePref handler from SettingsScreen
- Refactored SettingsScreen to be presentation-only component
- Added comprehensive tests for hook logic
- Preserved all toggle behavior, animations, and accessibility labels
- Follows repository hook patterns (typed returns, useCallback, JSDoc)

Resolves TrustUp-app#36
@D240021
Copy link
Copy Markdown
Contributor

D240021 commented Mar 27, 2026

Hey, @Arome8240! Please, fill the PR template correctly!

@D240021
Copy link
Copy Markdown
Contributor

D240021 commented Mar 29, 2026

@Arome8240 remember fill the PR template correctly!

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.

Extract Settings screen logic into a dedicated useSettingsScreen hook

2 participants