Fixed back button and seed phrase import padding#1207
Conversation
PR SummaryImproved the user experience by fixing the back button visibility logic and enhancing the password textarea styling. The back button now appears conditionally based on navigation history and import steps. Additionally, adjusted the padding in the password textarea for better text input visibility. Changes
autogenerated by presubmit.ai |
There was a problem hiding this comment.
🚨 Pull request needs attention.
Review Summary
Files Processed (2)
- src/ui/components/password/PasswordTextarea.tsx (1 hunk)
- src/ui/views/Welcome/import-profile/index.tsx (4 hunks)
Actionable Comments (1)
-
src/ui/views/Welcome/import-profile/index.tsx [111-119]
possible bug: "Unreachable code due to misplaced return statement"
Skipped Comments (1)
-
src/ui/components/password/PasswordTextarea.tsx [70-70]
maintainability: "Remove unnecessary empty line in CSS properties"
| if ( | ||
| activeTab === IMPORT_STEPS.GOOGLE_BACKUP || | ||
| activeTab === IMPORT_STEPS.ALL_SET || | ||
| activeTab === IMPORT_STEPS.IMPORT | ||
| ) { | ||
| if (location.key !== 'default') { | ||
| navigate(-1); | ||
| } | ||
| return; |
There was a problem hiding this comment.
The return statement is placed after the closing brace of the if block, making it unconditional. This means the function will always return regardless of the conditions, potentially preventing the dispatch({ type: 'GO_BACK' }) from ever being called. Consider moving the return statement inside the nested if block.
Related Issue
Closes #1206
Summary of Changes
The back button is now shown if there is a screen to go back to but not otherwise.
Also fixed the padding on the seed phrase import
Need Regression Testing
Risk Assessment