Skip to content

Conversation

@NileshPatel17
Copy link
Contributor

@NileshPatel17 NileshPatel17 commented Oct 4, 2019

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?

  • yarn:lint: There were several linting errors, but none relevant to the scope of this PR
  • yarn:test: Ran successfully

Checklist

  • Documentation
  • Testing
  • Ready to be merged
  • Added myself to contributors table

@vercel
Copy link

vercel bot commented Oct 4, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://codesandbox-cl-git-fork-nileshpatel17-refactor-patron-su-a61ba0.codesandbox1.now.sh

@vercel vercel bot temporarily deployed to staging October 4, 2019 16:58 Inactive
@NileshPatel17 NileshPatel17 changed the title refactor patron/subscription: /app/pages/Patron/PricingModal/PricingChoice/ChangeSubscription/index.ts Refactored 🧠 Overmind Hacktober | patron/subscription: /app/pages/Patron/PricingModal/PricingChoice/ChangeSubscription/index.ts Oct 4, 2019
@NileshPatel17 NileshPatel17 marked this pull request as ready for review October 4, 2019 17:01
patron: { tryAgainClicked },
},
} = useOvermind();
const isLoading = isUpdatingSubscription;
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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?

okay, will fix it.

Copy link
Contributor Author

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.

@NileshPatel17 NileshPatel17 force-pushed the refactor/patron-subscription branch from 6300027 to 606ec3e Compare October 5, 2019 08:59
@vercel vercel bot temporarily deployed to staging October 5, 2019 08:59 Inactive
@Saeris Saeris added Hacktoberfest 🔨 Refactor 🧠 Overmind Indicates that this is related to the app's State Management labels Oct 8, 2019
signals: any;
}

function ChangeSubscriptionComponent({
Copy link
Contributor

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> = ({

Copy link
Contributor Author

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.

@NileshPatel17 NileshPatel17 force-pushed the refactor/patron-subscription branch from 606ec3e to 10e35a8 Compare October 15, 2019 15:13
@CompuIves
Copy link
Member

Heyo! I tested this PR, but it seems like there is a still a syntax error in the component. The arrow (=>) of the arrow function is missing. After adding that this is ready to be merged.

@NileshPatel17 NileshPatel17 force-pushed the refactor/patron-subscription branch from 10e35a8 to 454f07a Compare October 17, 2019 13:20
@NileshPatel17
Copy link
Contributor Author

its fixed now. do not know how i missed it. sorry about that.

@NileshPatel17
Copy link
Contributor Author

did you get chance to take a look at. let me know if it requires more changes.

@SaraVieira
Copy link
Contributor

Everything looks good, trying to run the integrations again

Copy link
Member

@CompuIves CompuIves left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

@CompuIves CompuIves merged commit 25d3730 into codesandbox:master Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧠 Overmind Indicates that this is related to the app's State Management 🔨 Refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants