Skip to content

Commit 8449f2e

Browse files
satoshai-devclaude
andauthored
feat: add Next.js 16 App Router example (#36) (#55)
* feat: add Next.js 16 App Router example (#36) Demonstrates @satoshai/kit with Next.js 16 App Router: - StacksWalletProvider in a "use client" wrapper (providers.tsx) - Server layout importing client providers - Connect/disconnect, wallet selection, BNS, transfer STX, write contract Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: hydration mismatch and add full demo parity with vite example - Add mounted guard for wallet list (extensions only detected client-side) - Add all demos: TransferSTX, SignStructuredMessage, SignTransaction, WriteContract - Remove deprecated anchorMode from makeUnsignedSTXTokenTransfer - Match vite-react example feature coverage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add SignMessage demo and typed WriteContract for vite-react parity - Add SignMessageDemo component with text input - Use createContractConfig + typed ABI for WriteContractDemo (matching vite-react) - Pass address prop to WriteContractDemo for typed args Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 059b504 commit 8449f2e

File tree

8 files changed

+965
-0
lines changed

8 files changed

+965
-0
lines changed

examples/nextjs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.next
2+
next-env.d.ts

examples/nextjs/app/layout.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import type { Metadata } from 'next';
2+
import { Providers } from './providers';
3+
4+
export const metadata: Metadata = {
5+
title: '@satoshai/kit — Next.js Example',
6+
description: 'Stacks wallet integration with Next.js App Router',
7+
};
8+
9+
export default function RootLayout({ children }: { children: React.ReactNode }) {
10+
return (
11+
<html lang="en">
12+
<body style={{ fontFamily: 'system-ui', padding: '2rem' }}>
13+
<Providers>{children}</Providers>
14+
</body>
15+
</html>
16+
);
17+
}

0 commit comments

Comments
 (0)