-
-
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/OnboardingScreenWithBg/index.js to TypeScript #11273
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 comments
app/components/Views/GasEducationCarousel/__snapshots__/index.test.tsx.snap
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
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.
LGTM
…js to TypeScript (#11273) Title: chore(js-ts): Convert app/components/UI/OnboardingScreenWithBg/index.js to TypeScript Description: This PR converts the OnboardingScreenWithBg component from JavaScript to TypeScript. The following changes have been made: 1. Renamed `index.js` to `index.tsx`. 2. Removed `PropTypes` and implemented TypeScript interfaces and types. 3. Updated imports to include necessary types. 4. Added type annotations to function parameters and variables. 5. Created custom types for `ImageKeys` and `ImagesType`. 6. Updated the component to use the new TypeScript types and interfaces. 7. Removed the `propTypes` object and added JSDoc comments to the interface. 8. Implemented null checks for the `backgroundImage`. Key changes: - Converted `colors` parameter type in `createStyles` function to `ThemeColors`. - Created `OnboardingScreenWithBgProps` interface for component props. - Updated `images` object type to `ImagesType`. - Added type safety for the `screen` prop using `ImageKeys` type. Checklist: - [x] Converted JS file to TS - [x] Updated types and added necessary imports - [x] Ensured `yarn tsc` passes without errors - [x] Ensured `yarn lint` passes without errors (warnings ignored as per criteria) - [x] Added comments from old `propTypes` to the new interface Link to Devin run: https://preview.devin.ai/devin/338aa8109dd94cdcac49824ec6878b80 This Devin run was requested by Sampriti. Please review the changes and let me know if any further modifications are needed. If you have any feedback, you can leave comments in the PR and I'll address them in the app! --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Title: chore(js-ts): Convert app/components/UI/OnboardingScreenWithBg/index.js to TypeScript
Description:
This PR converts the OnboardingScreenWithBg component from JavaScript to TypeScript. The following changes have been made:
index.js
toindex.tsx
.PropTypes
and implemented TypeScript interfaces and types.ImageKeys
andImagesType
.propTypes
object and added JSDoc comments to the interface.backgroundImage
.Key changes:
colors
parameter type increateStyles
function toThemeColors
.OnboardingScreenWithBgProps
interface for component props.images
object type toImagesType
.screen
prop usingImageKeys
type.Checklist:
yarn tsc
passes without errorsyarn lint
passes without errors (warnings ignored as per criteria)propTypes
to the new interfaceLink to Devin run: https://preview.devin.ai/devin/338aa8109dd94cdcac49824ec6878b80
This Devin run was requested by Sampriti.
Please review the changes and let me know if any further modifications are needed.
If you have any feedback, you can leave comments in the PR and I'll address them in the app!