-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dapp-feat: Remove Current Deployed Contract Instance feature complete (…
…#415) * dapp-feat: Remove Current Contract Instance feature complete Signed-off-by: Logan Nguyen <[email protected]> * dapp-update: removed clearCachedTransactions when remove contract instance Signed-off-by: Logan Nguyen <[email protected]> * dapp-update: added sessionedContractAddress to TranasctionResult Signed-off-by: Logan Nguyen <[email protected]> * dapp-update: added new "transactions to show" logic to contract interactions Signed-off-by: Logan Nguyen <[email protected]> * dapp-feat: cached contract create transactions to localStorage Signed-off-by: Logan Nguyen <[email protected]> * dapp-update: added a new custom hook to filter transactions by contract address Signed-off-by: Logan Nguyen <[email protected]> --------- Signed-off-by: Logan Nguyen <[email protected]>
- Loading branch information
1 parent
568fdc7
commit 77e6ade
Showing
39 changed files
with
647 additions
and
206 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
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
74 changes: 74 additions & 0 deletions
74
system-contract-dapp-playground/src/components/common/ConfirmModal.tsx
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,74 @@ | ||
/*- | ||
* | ||
* Hedera Smart Contracts | ||
* | ||
* Copyright (C) 2023 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
import { | ||
Modal, | ||
ModalOverlay, | ||
ModalContent, | ||
ModalHeader, | ||
ModalCloseButton, | ||
ModalBody, | ||
ModalFooter, | ||
} from '@chakra-ui/react'; | ||
|
||
interface PageProps { | ||
isOpen: boolean; | ||
modalBody: any; | ||
onClose: () => void; | ||
modalHeader: string; | ||
handleAcknowledge: any; | ||
} | ||
|
||
const ConfirmModal = ({ | ||
isOpen, | ||
modalBody, | ||
onClose, | ||
modalHeader, | ||
handleAcknowledge, | ||
}: PageProps) => { | ||
return ( | ||
<Modal isOpen={isOpen} isCentered onClose={onClose}> | ||
<ModalOverlay /> | ||
<ModalContent | ||
className="h-fit flex flex-col gap-3 rounded-xl drop-shadow-xl | ||
bg-secondary text-white font-styrene w-[30rem]" | ||
> | ||
<ModalHeader>{modalHeader}</ModalHeader> | ||
<ModalCloseButton /> | ||
|
||
{/* break line */} | ||
<hr className="border-t border-white/40 -mt-3" /> | ||
|
||
<ModalBody>{modalBody}</ModalBody> | ||
|
||
<ModalFooter> | ||
<button | ||
onClick={handleAcknowledge} | ||
className="border border-button-stroke-violet px-6 py-2 rounded-lg font-medium hover:bg-button-stroke-violet hover:text-white transition duration-300" | ||
> | ||
Acknowledge | ||
</button> | ||
</ModalFooter> | ||
</ModalContent> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default ConfirmModal; |
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.