-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(js-ts): Convert app/components/UI/BlockingActionModal/index.js to TypeScript #11308
base: main
Are you sure you want to change the base?
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment
import { ActivityIndicator, StyleSheet, View } from 'react-native'; | ||
import Modal from 'react-native-modal'; | ||
import { baseStyles } from '../../../styles/common'; | ||
import { useTheme } from '../../../util/theme'; | ||
import { Theme } from '../../../util/theme/models'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { Theme } from '../../../util/theme/models'; | |
import { Theme } from '@metamask/design-tokens'; |
Quality Gate passedIssues Measures |
Convert app/components/UI/BlockingActionModal/index.js to TypeScript
Changes Made
index.js
toindex.tsx
PropTypes
import and prop type definitionsBlockingActionModalProps
interface for component propsTheme
type from '../../../util/theme/models'colors
parameter increateStyles
functiononAnimationCompleted
prop optional to maintain compatibilityConnectQRHardware/index.tsx
Motivation
This change is part of our ongoing effort to migrate the codebase to TypeScript, improving type safety and developer experience.
Context
The BlockingActionModal component is used in various parts of the application to display a modal with a loading spinner. Converting it to TypeScript will help catch potential type-related errors and improve code maintainability.
Related Issues
N/A
Manual Testing Steps
isLoadingAction
is true.modalVisible
prop.Notes
onAnimationCompleted
prop was made optional to avoid unnecessary modifications to other files using this component.ConnectQRHardware/index.tsx
have been reverted to ensure this PR only contains intended changes related to the BlockingActionModal component.This Devin run was requested by Sampriti