Skip to content
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] add new async hook logic for modals #92

Merged
merged 48 commits into from Mar 1, 2023
Merged

Conversation

weeebr
Copy link
Contributor

@weeebr weeebr commented Jan 21, 2023

No description provided.

@weeebr weeebr marked this pull request as draft January 21, 2023 20:00
@weeebr weeebr marked this pull request as ready for review January 22, 2023 00:20
src/ui/internal/hooks/useAsync.ts Show resolved Hide resolved
src/ui/internal/hooks/useAsync.ts Outdated Show resolved Hide resolved
src/ui/internal/hooks/useAsync.ts Show resolved Hide resolved
src/ui/internal/hooks/useAsync.ts Outdated Show resolved Hide resolved
src/ui/internal/modals/AddApproveArbitrator.tsx Outdated Show resolved Hide resolved
src/ui/internal/modals/ApproveSettlement.tsx Outdated Show resolved Hide resolved
src/ui/internal/modals/ClaimMultiple.tsx Outdated Show resolved Hide resolved
src/ui/internal/modals/SettlementOffer.tsx Show resolved Hide resolved
src/ui/internal/modals/Claim.tsx Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@tgmarinho
Copy link
Contributor

run:

yarn lint

and

yarn lint:fix

These commands above will help get some feedbacks ;)

There are some imports not been used.

Screen Shot 2023-01-22 at 12 49 56

src/ui/internal/modals/ApproveSettlement.tsx Outdated Show resolved Hide resolved
src/ui/internal/modals/Arbitrate.tsx Outdated Show resolved Hide resolved
src/ui/internal/modals/Claim.tsx Outdated Show resolved Hide resolved
src/ui/internal/modals/Claim.tsx Outdated Show resolved Hide resolved
src/ui/internal/modals/ClaimMultiple.tsx Outdated Show resolved Hide resolved
src/ui/internal/modals/Pay.tsx Show resolved Hide resolved
@tgmarinho
Copy link
Contributor

What is this PR solving?
You added a nice hook; I love SWR too, but are some bugs being fixed here? Or only refactoring and improvements?
This change is nice but also introduces some bugs, like breaking the rules of the hooks.

It should be tested more. I couldn't do that. I only reviewed the code.

@tgmarinho tgmarinho marked this pull request as draft January 31, 2023 14:07
@tgmarinho
Copy link
Contributor

Converting to draft, once we need to test it, also fix the conflicts.

@weeebr weeebr changed the title add new async hook logic for modals [chore] add new async hook logic for modals Feb 3, 2023
@@ -154,6 +132,7 @@ export const AddApproveArbitrator = ({
setAction("added");
})
.catch((e) => {
console.error(e);
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?

return (
<form ref={closeHandlerRef} autoComplete="off" onSubmit={handleSubmit}>
<ScopedModal
title={title}
body={ModalBody()}
footer={ModalFooter()}
body={<ModalBody />}
Copy link
Contributor

Choose a reason for hiding this comment

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

be careful here

body={ModalBody()}
footer={ModalFooter()}
body={<ModalBody />}
footer={<ModalFooter />}
Copy link
Contributor

Choose a reason for hiding this comment

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

be careful here

@tgmarinho tgmarinho marked this pull request as ready for review February 15, 2023 19:36
@tgmarinho tgmarinho marked this pull request as draft February 15, 2023 19:36
@weeebr weeebr marked this pull request as ready for review February 15, 2023 22:20
@tgmarinho tgmarinho self-requested a review March 1, 2023 15:54
Copy link
Contributor

@tgmarinho tgmarinho left a comment

Choose a reason for hiding this comment

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

LGTM

@tgmarinho tgmarinho merged commit a8b6ed8 into main Mar 1, 2023
@ps1dr3x ps1dr3x deleted the feat/add-async-hook branch December 4, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants