Skip to content

Commit

Permalink
fixing useMemo and balance in SOL (solana-foundation#562)
Browse files Browse the repository at this point in the history
* fixing useMemo and balance in SOL

* imported useMemo

---------

Co-authored-by: shivaji <[email protected]>
  • Loading branch information
2 people authored and adpthegreat committed Oct 23, 2024
1 parent eb7413f commit 345f1a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/courses/intro-to-solana/interact-with-wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -267,7 +267,7 @@ export const BalanceDisplay: FC = () => {

return (
<div>
<p>{publicKey ? `Balance: ${balance / LAMPORTS_PER_SOL} SOL` : ""}</p>
<p>{publicKey ? `Balance: ${balance} SOL` : ""}</p>
</div>
);
};
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 345f1a3

Please sign in to comment.