-
Notifications
You must be signed in to change notification settings - Fork 0
docs(results) - refactor logic into a hook #402
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| employerAmount?: string; | ||
| description?: string; | ||
| zendeskId?: string; | ||
| zendeskURL?: string; |
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.
we forgot to remove this when we merged the other PR about zendesk
| } | ||
|
|
||
| .RemoteFlows__Estimation__Separator { | ||
| .RemoteFlows__Separator { |
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.
I will need this in another component
| ); | ||
| } | ||
|
|
||
| const useEstimationResults = (estimation: CostCalculatorEmployment) => { |
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.
There's no state change is this function, right? So why is it a hook?
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.
it was to separate the logic from the render function
If a partner wants to have the data normalized to do the component, we could share this hook
I follow the same pattern here
I was doing something else and I figure out that it would be a good idea to put the logic inside a hook, in case we need to give the hook to let partners render the component but at least the logic is done.