diff --git a/client/src/components/Transactions.jsx b/client/src/components/Transactions.jsx index f0e20aa..f3fd114 100644 --- a/client/src/components/Transactions.jsx +++ b/client/src/components/Transactions.jsx @@ -6,11 +6,20 @@ import useFetch from "../hooks/useFetch"; import dummyData from "../utils/dummyData"; import { shortenAddress } from "../utils/shortenAddress"; -const TransactionsCard = ({ addressTo, addressFrom, timestamp, message, keyword, amount, url }) => { +const TransactionsCard = ({ + addressTo, + addressFrom, + timestamp, + message, + keyword, + amount, + url, +}) => { const gifUrl = useFetch({ keyword }); return ( -
- -

From: {shortenAddress(addressFrom)}

+
+

+ From: {shortenAddress(addressFrom)} +

- -

To: {shortenAddress(addressTo)}

+
+

+ To: {shortenAddress(addressTo)} +

Amount: {amount} ETH

{message && ( diff --git a/client/src/components/Welcome.jsx b/client/src/components/Welcome.jsx index a009dfa..c1122ea 100644 --- a/client/src/components/Welcome.jsx +++ b/client/src/components/Welcome.jsx @@ -7,7 +7,8 @@ import { TransactionContext } from "../context/TransactionContext"; import { shortenAddress } from "../utils/shortenAddress"; import { Loader } from "."; -const companyCommonStyles = "min-h-[70px] sm:px-0 px-2 sm:min-w-[120px] flex justify-center items-center border-[0.5px] border-gray-400 text-sm font-light text-white"; +const companyCommonStyles = + "min-h-[70px] sm:px-0 px-2 sm:min-w-[120px] flex justify-center items-center border-[0.5px] border-gray-400 text-sm font-light text-white"; const Input = ({ placeholder, name, type, value, handleChange }) => ( ( ); const Welcome = () => { - const { currentAccount, connectWallet, handleChange, sendTransaction, formData, isLoading } = useContext(TransactionContext); + const { + currentAccount, + connectWallet, + handleChange, + sendTransaction, + formData, + isLoading, + } = useContext(TransactionContext); const handleSubmit = (e) => { const { addressTo, amount, keyword, message } = formData; @@ -41,7 +49,8 @@ const Welcome = () => { Send Crypto
across the world

- Explore the crypto world. Buy and sell cryptocurrencies easily on Krypto. + Explore the crypto world. Buy and sell cryptocurrencies easily on + Krypto.

{!currentAccount && (
-

- {shortenAddress(currentAccount)} -

+ {currentAccount ? ( +

+ {shortenAddress(currentAccount)} +

+ ) : ( +

Address

+ )}

Ethereum

@@ -94,24 +107,44 @@ const Welcome = () => {
- - - - + + + +
- {isLoading - ? - : ( - - )} + {isLoading ? ( + + ) : ( + + )}
diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..126eef0 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "project_web3.0", + "lockfileVersion": 2, + "requires": true, + "packages": {} +}