-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(home): unlock modal * test(unlockModal): update test and cleanup * refactor(home): list-channel modal * refactor(home): list-channel modal - spinner and no channel info * refactor(home): open-channel modal * refactor(home): open-channel modal * refactor(home): send modal * refactor(home): receive modal * refactor(home): tx-details modal * test(modal): update test and remove close test functionality is covered by next-ui modal * chore: debugging * refactor(login): use new components * fix(home): avoid double effect execution * refactor(home): modal usage and receive-modal * refactor(home): onchain receive * refactor(home): lightning receive * refactor(home): cleanup receive * test(receiveModal): update tests to use new tabs * fix(receiveModal): minor improvements * refactor(home): send modal * chore: remove light buttons * fix(setup): import statement * refactor(confirmModal): use explicit export * fix(home): send modal - onchain design * fix(settings): change pw modal usage * use vertical tabList on small screen size --------- Co-authored-by: Christoph Stenglein <[email protected]>
- Loading branch information
1 parent
02728f6
commit efca53d
Showing
34 changed files
with
1,024 additions
and
972 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { useDisclosure } from "@nextui-org/use-disclosure"; | ||
import { useState } from "react"; | ||
|
||
export type ModalType = | ||
| "SEND" | ||
| "RECEIVE" | ||
| "DETAIL" | ||
| "OPEN_CHANNEL" | ||
| "LIST_CHANNEL" | ||
| "UNLOCK" | ||
| null; | ||
|
||
export function useModalManager() { | ||
const [activeModal, setActiveModal] = useState<ModalType>(null); | ||
const disclosure = useDisclosure(); | ||
|
||
const openModal = (modalType: ModalType) => { | ||
setActiveModal(modalType); | ||
disclosure.onOpen(); | ||
}; | ||
|
||
const closeModal = () => { | ||
setActiveModal(null); | ||
disclosure.onClose(); | ||
}; | ||
|
||
return { | ||
activeModal, | ||
disclosure, | ||
openModal, | ||
closeModal, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.