|
| 1 | +import {AiFillWarning} from "react-icons/ai"; |
| 2 | +import {useState} from "react"; |
1 | 3 | import {ActionsRequiredModalManager} from "./modals/actions-required/ActionsRequiredModalManager.tsx";
|
| 4 | +import {BuyKeysModal} from "../keys/modals/buy-keys/BuyKeysModal.tsx"; |
| 5 | +import {ViewKeysModal} from "./modals/view-keys/ViewKeysModal.tsx"; |
| 6 | +import {ContinueInBrowserModal} from "./modals/ContinueInBrowserModal.tsx"; |
| 7 | +import {BiLinkExternal} from "react-icons/bi"; |
2 | 8 |
|
3 | 9 | export function SentryWallet() {
|
| 10 | + const [number, setNumber] = useState<number>(0); |
| 11 | + const [showBuyModal, setShowBuyModal] = useState<boolean>(false); |
| 12 | + const [showViewModal, setShowViewModal] = useState<boolean>(false); |
| 13 | + const [showContinueInBrowserModal, setShowContinueInBrowserModal] = useState<boolean>(false); |
| 14 | + |
4 | 15 | return (
|
5 |
| - <div> |
6 |
| - Sentry Wallet |
| 16 | + <div className="w-full h-screen"> |
| 17 | + <div |
| 18 | + className="sticky top-0 flex flex-row items-center w-full h-16 border-b border-gray-200 pl-10 gap-2 bg-white"> |
| 19 | + <h2 className="text-lg">Assigned Keys</h2> |
| 20 | + <p className="text-sm bg-gray-100 pl-2 pr-2 rounded-2xl text-gray-500"> |
| 21 | + {number} keys in 0 (placeholder) wallets |
| 22 | + </p> |
| 23 | + </div> |
| 24 | + |
| 25 | + {!number && ( |
| 26 | + <ActionsRequiredModalManager/> |
| 27 | + )} |
| 28 | + |
| 29 | + {showBuyModal && ( |
| 30 | + <BuyKeysModal |
| 31 | + number={number} |
| 32 | + setNumber={setNumber} |
| 33 | + setShowModal={setShowBuyModal} |
| 34 | + /> |
| 35 | + )} |
| 36 | + |
| 37 | + {showViewModal && ( |
| 38 | + <ViewKeysModal |
| 39 | + setShowViewModal={setShowViewModal} |
| 40 | + setShowContinueInBrowserModal={setShowContinueInBrowserModal} |
| 41 | + /> |
| 42 | + )} |
| 43 | + |
| 44 | + {showContinueInBrowserModal && ( |
| 45 | + <ContinueInBrowserModal setShowContinueInBrowserModal={setShowContinueInBrowserModal}/> |
| 46 | + )} |
| 47 | + |
| 48 | + |
| 49 | + <div className="w-full h-auto flex flex-col justify-center items-center"> |
| 50 | + <div className="absolute top-0 bottom-0 flex flex-col justify-center items-center gap-4"> |
| 51 | + <AiFillWarning className="w-16 h-16 text-[#F59E28]"/> |
| 52 | + <p className="text-2xl font-semibold"> |
| 53 | + Keys not assigned |
| 54 | + </p> |
| 55 | + <p className="text-lg text-[#525252]"> |
| 56 | + Add wallets to assign keys to the Sentry |
| 57 | + </p> |
| 58 | + |
| 59 | + <button |
| 60 | + onClick={() => setShowViewModal(true)} |
| 61 | + className="flex justify-center items-center gap-1 text-[15px] text-white bg-[#F30919] font-semibold mt-2 px-6 py-3" |
| 62 | + > |
| 63 | + Assign keys from new wallet |
| 64 | + <BiLinkExternal className="w-5 h-5"/> |
| 65 | + </button> |
| 66 | + |
| 67 | + <p className="text-[15px] text-[#525252] mt-2"> |
| 68 | + Don't own any keys? |
7 | 69 |
|
8 |
| - <ActionsRequiredModalManager/> |
| 70 | + <a |
| 71 | + onClick={() => setShowBuyModal(true)} |
| 72 | + className="text-[#F30919] ml-1 cursor-pointer" |
| 73 | + > |
| 74 | + Purchase keys |
| 75 | + </a> |
| 76 | + </p> |
| 77 | + </div> |
| 78 | + </div> |
9 | 79 | </div>
|
10 | 80 | )
|
11 | 81 | }
|
0 commit comments