Skip to content
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/GenericButton/index.android.js to TypeScript #11280

Merged
merged 5 commits into from
Sep 23, 2024

Conversation

devin-ai-integration[bot]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Sep 18, 2024

PR Description: Convert GenericButton component to TypeScript

Summary

This PR converts the GenericButton component from JavaScript to TypeScript. The component is located in app/components/UI/GenericButton/index.android.tsx.

Changes

  • Converted PropTypes to TypeScript interface (GenericButtonProps)
  • Made children and onPress props optional
  • Updated onPress type to accept GestureResponderEvent
  • Removed PropTypes usage
  • Used React.FC type for the component
  • Updated import statements to include necessary types from 'react-native'

Details

  • The GenericButton component is now fully typed, improving type safety and developer experience
  • No changes were made to the component's functionality
  • The test file (index.test.tsx) was updated to include a mock onPress function and children prop in the shallow render test

Notes

  • This component is marked as deprecated in favor of the new Button component from the component library
  • No new type libraries were needed for this conversion

Testing

  • Existing tests have been updated and should pass
  • Manual testing is recommended to ensure the component still functions as expected in the app

Related Issues

Please review the changes and let me know if any further modifications are needed.


Link to Devin run: https://preview.devin.ai/devin/67b8e6becb3f4524a620748e85cb5131
Requested by: Silas

If you have any feedback, you can leave comments in the PR and I'll address them in the app!

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner September 18, 2024 11:40
Copy link
Contributor

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.

Copy link

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Cal-L Cal-L added team-ai AI team (for the Devin AI bot) team-mobile-platform labels Sep 23, 2024
@Cal-L Cal-L added this pull request to the merge queue Sep 23, 2024
Merged via the queue into main with commit c1a858c Sep 23, 2024
44 of 48 checks passed
@Cal-L Cal-L deleted the convert-ts-index-android-js branch September 23, 2024 20:39
@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2024
@metamaskbot metamaskbot added the release-7.33.0 Issue or pull request that will be included in release 7.33.0 label Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.33.0 Issue or pull request that will be included in release 7.33.0 team-ai AI team (for the Devin AI bot) team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants