-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Refactored 🧠 Overmind Hacktober | patron/subscription: /app/pages/Patron/PricingModal/PricingChoice/ChangeSubscription/index.ts #2654
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
Conversation
|
This pull request is automatically deployed with Now. Latest deployment for this branch: https://codesandbox-cl-git-fork-nileshpatel17-refactor-patron-su-a61ba0.codesandbox1.now.sh |
| patron: { tryAgainClicked }, | ||
| }, | ||
| } = useOvermind(); | ||
| const isLoading = isUpdatingSubscription; |
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.
How about not defining a new variable and directly using isUpdatingSubscription or doing this { isUpdatingSubscription: isLoading, error } at L30?
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.
Wdyt @Saeris @christianalfoni ?
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.
How about not defining a new variable and directly using
isUpdatingSubscriptionor doing this{ isUpdatingSubscription: isLoading, error }atL30?
okay, will fix it.
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.
@jyash97 its fixed, and also rebase commit. let me know if any more changes are required.
6300027 to
606ec3e
Compare
| signals: any; | ||
| } | ||
|
|
||
| function ChangeSubscriptionComponent({ |
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.
Let's change this to an arrow function and just export the component directly instead of declaring then exporting with a different name at the end of the file, ie:
export const ChangeSubscription: React.FC<IChangeSubscriptionProps> = ({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.
Done. also verified the import reference across code. no changes are required.
606ec3e to
10e35a8
Compare
|
Heyo! I tested this PR, but it seems like there is a still a syntax error in the component. The arrow ( |
10e35a8 to
454f07a
Compare
|
its fixed now. do not know how i missed it. sorry about that. |
|
did you get chance to take a look at. let me know if it requires more changes. |
|
Everything looks good, trying to run the integrations again |
CompuIves
left a comment
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! ![]()
What kind of change does this PR introduce?
This is part of the requested refactor for hacktoberfest mentioned in #2621.
What is the current behavior?
Previously it was utilizing inject and hooksObserver from app/componentConnectors.
#2621
What is the new behavior?
Prefers useOvermind over inject
What steps did you take to test this?
Checklist