refactor: convert call-to-action.js to Typescript#1223
refactor: convert call-to-action.js to Typescript#1223garvthakre wants to merge 4 commits intometabrainz:masterfrom
Conversation
|
hey @MonkeyDo , pls check this one and also can u close my previous PR's ,means alot to me for your time. |
MonkeyDo
left a comment
There was a problem hiding this comment.
Thanks for working on this!
You forgot to remove the original .js file, this currently creates a duplicate.
add the docs of props.query and fix the order of params and returns for better readability
|
@MonkeyDo i guess this is also good to go now, and i am a bit confused about that interface vs types thing , so for that i need your opinion on that . |
To be honest I had to look up the differences between the two as well the other day, and I don't think the difference matters to us here. |
|
okay thanks for the clarification , i will change it asap. |
change the interface to types to maintain the consistency
Problem
This PR is part of the ongoing TypeScript migration of the BookBrainz codebase. The call-to-action component is currently written in JavaScript with PropTypes for type checking, which provides less type safety compared to TypeScript's compile-time type checking.
Solution
Converted the call-to-action component from JavaScript to TypeScript:
1.Renamed
call-to-action.jstocall-to-action.tsx2.Removed PropTypes dependency and validation
3.Followed TypeScript patterns established in other converted components (e.g., admin-panel-search-field.tsx,admin-panel-search-results.tsx)
Areas of Impact
src\client\components\pages\parts\call-to-action.jstosrc\client\components\pages\parts\call-to-action.tsx(renamed and converted)