Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Miscellaneous fixes (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregfromstl authored Apr 26, 2024
1 parent 6695307 commit 669dd66
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
8 changes: 8 additions & 0 deletions src/app/typescript/v5/react/ThirdwebProvider/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ export const metadata = createMetadata({

`ThirdwebProvider` is a light-weight component that sets up React Query context for thirdweb SDK hooks.

<Callout title="Server-side rendering" variant="info">

ThirdwebProvider uses context and does not currently support server-side rendering.

If you're using a framework like Next.js, you'll need to opt-out of SSR with "use client" or whatever your framework of choice supports.

</Callout>

```tsx
import { ThirdwebProvider } from "thirdweb/react";

Expand Down
6 changes: 6 additions & 0 deletions src/app/typescript/v5/react/components/ConnectButton/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ To mark a wallet as `Recommended`, pass in the `recommended: true` property in t

Refer to [Props](#props) to see all the available configuration options

<Callout title="In-App Wallets" variant="info">

This example uses [In-App Wallets](/connect/in-app-wallet/overview), a special type of wallet that allows users to connect to your app using email, social logins, or other custom forms of authentication.

</Callout>

```tsx
import { ConnectButton } from "thirdweb/react";
import { createWallet, inAppWallet } from "thirdweb/wallets";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ function Example() {
contract,
method: "mint",
params: [address, amount],
})
});
return tx;
}}
onTransactionSent={(result) =>
onTransactionSent={(result) => {
console.log("Transaction submitted", result.transactionHash);
}}
onTransactionConfirmed={(receipt) =>
onTransactionConfirmed={(receipt) => {
console.log("Transaction confirmed", receipt.transactionHash);
}}
onError={(error) =>
onError={(error) => {
console.error("Transaction error", error);
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/app/typescript/v5/react/connecting-wallets/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The SDK supports 350+ wallets out of the box, all you need to pass is their id.

## Using Components

You can use [`ConnectButton`](/typescript/v5/react/components/ConnectButton) or [`ConnectEmbed`](/typescript/v5/react/components/ConnectButton) component for a quick, easy and customizable UI.
You can use [`ConnectButton`](/typescript/v5/react/components/ConnectButton) or [`ConnectEmbed`](/typescript/v5/react/components/ConnectEmbed) component for a quick, easy and customizable UI.

These components provide a beautiful UI for connecting various wallets and take care of a lot of wallet-specific edge cases - so you can focus on building your app.

Expand Down
2 changes: 2 additions & 0 deletions src/app/typescript/v5/react/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {

## Get Started

Many of the components and hooks in the React SDK use a [`client`](/typescript/v5/core/client) to interface with the core SDK and your private RPC endpoints. You'll need to create a `clientId` in the [Dashboard](https://thirdweb.com/create-api-key) to generate this client.

<Stack>

<ArticleIconCard
Expand Down

0 comments on commit 669dd66

Please sign in to comment.