mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-19 18:41:02 +00:00
Fix Settings screen React Native Web compatibility
Issues Fixed: 1. Alert.alert() with button arrays doesn't work on React Native Web - Created FontSizeModal to replace Alert-based font size selector - Simplified biometric toggle to avoid confirmation dialog with buttons 2. TypeScript errors with modal props - Removed invalid onAccept prop from TermsOfServiceModal and PrivacyPolicyModal calls 3. Web compatibility improvements - All interactive elements now use proper modals or simple alerts - Font size selection shows professional modal with preview - Biometric auth directly prompts for authentication Files Changed: - src/screens/SettingsScreen.tsx: Fixed Alert.alert() usage, added FontSizeModal - src/components/FontSizeModal.tsx: NEW - Professional font size selector - PHASE_1_COMPLETE.md: Updated documentation with fixes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -188,14 +188,39 @@ boxShadow: '0 2px 4px rgba(0, 0, 0, 0.05)',
|
||||
**Files Fixed:**
|
||||
- SettingsScreen.tsx
|
||||
|
||||
### Fixed React Native Web Compatibility
|
||||
|
||||
**Issue:** Alert.alert() with button arrays doesn't work properly on React Native Web
|
||||
|
||||
**Fix:**
|
||||
- Created FontSizeModal.tsx to replace Alert-based font size selector
|
||||
- Simplified biometric toggle to avoid button arrays
|
||||
- Now all interactive elements use proper modals or simple alerts
|
||||
|
||||
**Files Fixed:**
|
||||
- SettingsScreen.tsx - Replaced Alert.alert() with modal
|
||||
- FontSizeModal.tsx - NEW professional font size selector
|
||||
|
||||
### Fixed TypeScript Errors
|
||||
|
||||
**Issue:** TermsOfServiceModal and PrivacyPolicyModal don't accept `onAccept` prop
|
||||
|
||||
**Fix:**
|
||||
- Removed `onAccept` prop from modal calls in SettingsScreen
|
||||
- Modals now only use `visible` and `onClose` props
|
||||
|
||||
**Files Fixed:**
|
||||
- SettingsScreen.tsx
|
||||
|
||||
---
|
||||
|
||||
## Files Created
|
||||
|
||||
1. `/home/mamostehp/pwap/mobile/src/components/EmailNotificationsModal.tsx` - 350 lines
|
||||
2. `/home/mamostehp/pwap/mobile/src/components/ChangePasswordModal.tsx` - 350 lines
|
||||
3. `/home/mamostehp/pwap/mobile/src/components/FontSizeModal.tsx` - 200 lines
|
||||
|
||||
**Total:** 2 new files, 700 lines of code
|
||||
**Total:** 3 new files, 900 lines of code
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user