Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: nuxt wagmi example #3430

Merged
merged 14 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.changeset
coverage
pnpm-lock.yaml
.nuxt
24 changes: 24 additions & 0 deletions examples/nuxt-wagmi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example
75 changes: 75 additions & 0 deletions examples/nuxt-wagmi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Nuxt Minimal Starter

Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Make sure to install dependencies:

```bash
# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
npm run dev

# pnpm
pnpm dev

# yarn
yarn dev

# bun
bun run dev
```

## Production

Build the application for production:

```bash
# npm
npm run build

# pnpm
pnpm build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:

```bash
# npm
npm run preview

# pnpm
pnpm preview

# yarn
yarn preview

# bun
bun run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
48 changes: 48 additions & 0 deletions examples/nuxt-wagmi/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<script setup lang="ts">
import { createAppKit, useAppKitTheme } from '@reown/appkit/vue'
import { wagmiAdapter, projectId, networks } from './config/wagmi'

createAppKit({
adapters: [wagmiAdapter],
networks,
projectId,
themeMode: 'light',
features: {
analytics: true
},
metadata: {
name: 'AppKit Nuxt Wagmi Example',
description: 'AppKit Nuxt Wagmi Example',
url: 'https://reown.com/appkit',
icons: ['https://avatars.githubusercontent.com/u/179229932?s=200&v=4']
}
})

const themeState = useAppKitTheme()
</script>

<template>
<client-only>
<div class="page-container">
<div class="logo-container">
<img
:src="themeState.themeMode === 'dark' ? '/reown-logo-white.png' : '/reown-logo.png'"
alt="Reown"
width="150"
/>
<img src="/appkit-logo.png" alt="Reown" width="150" />
</div>

<h1 class="page-title">Nuxt Wagmi Example</h1>

<div class="appkit-buttons-container">
<appkit-button />
<appkit-network-button />
</div>

<ActionButton />
<InfoList />
<Footer />
</div>
</client-only>
</template>
Loading
Loading