Skip to content

Commit

Permalink
docs: use inline default export
Browse files Browse the repository at this point in the history
  • Loading branch information
tien committed Jul 3, 2024
1 parent d19c5be commit 2f2ceb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions apps/docs/docs/getting-started/connect-wallets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import {
useConnectWallet,
} from "@reactive-dot/react";

function Wallets() {
export default function Wallets() {
const wallets = useWallets();
const connectedWallets = useConnectedWallets();

Expand Down Expand Up @@ -115,16 +115,14 @@ function Wallets() {
</section>
);
}

export default Wallet;
```

## Display available accounts

```tsx title="Accounts.tsx"
import { useAccounts } from "@reactive-dot/react";

function Accounts() {
export default function Accounts() {
const accounts = useAccounts();

return (
Expand All @@ -143,6 +141,4 @@ function Accounts() {
</section>
);
}

export default Accounts;
```
8 changes: 2 additions & 6 deletions apps/docs/docs/getting-started/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ import config from "./config";
import { ReDotChainProvider, ReDotProvider } from "@reactive-dot/react";
import { Suspense } from "react";

function App() {
export default function App() {
return (
<ReDotProvider config={config}>
{/* `chainId` match the ID previously specified via `polkadot: typeof dot` */}
Expand All @@ -153,8 +153,6 @@ function App() {
</ReDotProvider>
);
}

export default App;
```

## Use Reactive DOT
Expand All @@ -163,7 +161,7 @@ export default App;
import { config } from "./config";
import { useAccounts, useLazyLoadQuery } from "@reactive-dot/react";

function MyComponent() {
export default function MyComponent() {
const accounts = useAccounts();
const [timestamp, totalIssuance] = useLazyLoadQuery((builder) =>
builder
Expand All @@ -190,6 +188,4 @@ function MyComponent() {
</div>
);
}

export default MyComponent;
```

0 comments on commit 2f2ceb5

Please sign in to comment.