From 68284feced5a917230b44fa9857d9e07f1814b16 Mon Sep 17 00:00:00 2001 From: Shivaji Raut <108468912+shivaji43@users.noreply.github.com> Date: Tue, 15 Oct 2024 07:44:31 +0530 Subject: [PATCH] fixing useMemo and balance in SOL (#562) * fixing useMemo and balance in SOL * imported useMemo --------- Co-authored-by: shivaji <108468912+shivaji1134@users.noreply.github.com> --- content/courses/intro-to-solana/interact-with-wallets.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/courses/intro-to-solana/interact-with-wallets.md b/content/courses/intro-to-solana/interact-with-wallets.md index 53cdae15f..76cfc9db1 100644 --- a/content/courses/intro-to-solana/interact-with-wallets.md +++ b/content/courses/intro-to-solana/interact-with-wallets.md @@ -113,7 +113,7 @@ ensure this is to wrap your entire app in `ConnectionProvider` and ```tsx import { NextPage } from "next"; -import { FC, ReactNode } from "react"; +import { FC, ReactNode, useMemo } from "react"; import { ConnectionProvider, WalletProvider, @@ -159,7 +159,7 @@ full-featured wallet experience is to use `WalletModalProvider` and ```tsx import { NextPage } from "next"; -import { FC, ReactNode } from "react"; +import { FC, ReactNode, useMemo } from "react"; import { ConnectionProvider, WalletProvider, @@ -267,7 +267,7 @@ export const BalanceDisplay: FC = () => { return (
-

{publicKey ? `Balance: ${balance / LAMPORTS_PER_SOL} SOL` : ""}

+

{publicKey ? `Balance: ${balance} SOL` : ""}

); }; @@ -426,7 +426,7 @@ To complete this component, add ensure proper styling and behavior of the Wallet Adapter library components. ```tsx -import { FC, ReactNode } from "react"; +import { FC, ReactNode, useMemo } from "react"; import { ConnectionProvider, WalletProvider,