MCPcopy
hub / github.com/adrianhajdin/project_web3.0 / Welcome

Function Welcome

client/src/components/Welcome.jsx:23–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21);
22
23const Welcome = () => {
24 const { currentAccount, connectWallet, handleChange, sendTransaction, formData, isLoading } = useContext(TransactionContext);
25
26 const handleSubmit = (e) => {
27 const { addressTo, amount, keyword, message } = formData;
28
29 e.preventDefault();
30
31 if (!addressTo || !amount || !keyword || !message) return;
32
33 sendTransaction();
34 };
35
36 return (
37 <div className="flex w-full justify-center items-center">
38 <div className="flex mf:flex-row flex-col items-start justify-between md:p-20 py-12 px-4">
39 <div className="flex flex-1 justify-start items-start flex-col mf:mr-10">
40 <h1 className="text-3xl sm:text-5xl text-white text-gradient py-1">
41 Send Crypto <br /> across the world
42 </h1>
43 <p className="text-left mt-5 text-white font-light md:w-9/12 w-11/12 text-base">
44 Explore the crypto world. Buy and sell cryptocurrencies easily on Krypto.
45 </p>
46 {!currentAccount && (
47 <button
48 type="button"
49 onClick={connectWallet}
50 className="flex flex-row justify-center items-center my-5 bg-[#2952e3] p-3 rounded-full cursor-pointer hover:bg-[#2546bd]"
51 >
52 <AiFillPlayCircle className="text-white mr-2" />
53 <p className="text-white text-base font-semibold">
54 Connect Wallet
55 </p>
56 </button>
57 )}
58
59 <div className="grid sm:grid-cols-3 grid-cols-2 w-full mt-10">
60 <div className={`rounded-tl-2xl ${companyCommonStyles}`}>
61 Reliability
62 </div>
63 <div className={companyCommonStyles}>Security</div>
64 <div className={`sm:rounded-tr-2xl ${companyCommonStyles}`}>
65 Ethereum
66 </div>
67 <div className={`sm:rounded-bl-2xl ${companyCommonStyles}`}>
68 Web 3.0
69 </div>
70 <div className={companyCommonStyles}>Low Fees</div>
71 <div className={`rounded-br-2xl ${companyCommonStyles}`}>
72 Blockchain
73 </div>
74 </div>
75 </div>
76
77 <div className="flex flex-col flex-1 items-center justify-start w-full mf:mt-0 mt-10">
78 <div className="p-3 flex justify-end items-start flex-col rounded-xl h-40 sm:w-72 w-full my-5 eth-card .white-glassmorphism ">
79 <div className="flex justify-between flex-col w-full h-full">
80 <div className="flex justify-between items-start">

Callers

nothing calls this directly

Calls 1

shortenAddressFunction · 0.90

Tested by

no test coverage detected