Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 33 lines 980 B view raw
1import { useAccountQuery } from "@hey/indexer"; 2import { H4, Spinner } from "@/components/Shared/UI"; 3import { useSignupStore } from "."; 4 5const Minting = () => { 6 const { chosenUsername, setAccountAddress, setScreen, transactionHash } = 7 useSignupStore(); 8 9 useAccountQuery({ 10 notifyOnNetworkStatusChange: true, 11 onCompleted: (data) => { 12 if (data.account) { 13 setAccountAddress(data.account.address); 14 setScreen("success"); 15 } 16 }, 17 pollInterval: 1500, 18 skip: !transactionHash, 19 variables: { request: { username: { localName: chosenUsername } } } 20 }); 21 22 return ( 23 <div className="m-8 flex flex-col items-center justify-center"> 24 <H4>We are preparing your account!</H4> 25 <div className="mt-3 text-center font-semibold text-gray-500 dark:text-gray-200"> 26 This will take a few seconds to a few minutes. Please be patient. 27 </div> 28 <Spinner className="mt-8" /> 29 </div> 30 ); 31}; 32 33export default Minting;