Skip to content

Commit

Permalink
docs: restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Mar 23, 2022
1 parent a26102b commit 91717b5
Show file tree
Hide file tree
Showing 51 changed files with 248 additions and 2,498 deletions.
35 changes: 4 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,6 @@
# wagmi

React Hooks library for Ethereum, built on [ethers.js](https://github.com/ethers-io/ethers.js).

<p>
<a aria-label="Version" href="https://www.npmjs.com/package/wagmi">
<img
alt=""
src="https://img.shields.io/npm/v/wagmi?color=%23161b22&label=%20npm"
/>
</a>
<a aria-label="License" href="/LICENSE">
<img
alt=""
src="https://img.shields.io/npm/l/wagmi?color=%23161b22"
/>
</a>
<a aria-label="Sponsors" href="https://github.com/sponsors/tmm">
<img
alt=""
src="https://img.shields.io/github/sponsors/tmm?color=%23161b22"
/>
</a>
<a aria-label="Downloads" href="https://www.npmjs.com/package/wagmi">
<img
alt=""
src="https://img.shields.io/npm/dm/wagmi?color=%23161b22"
/>
</a>
</p>
# wagmi [![Version](https://img.shields.io/npm/v/wagmi?colorA=292929&colorB=3c82f6)](https://www.npmjs.com/package/wagmi) [![Downloads](https://img.shields.io/npm/dm/wagmi?colorA=292929&colorB=3c82f6)](https://www.npmjs.com/package/wagmi) [![Sponsors](https://img.shields.io/github/sponsors/tmm?colorA=292929&colorB=3c82f6)](https://github.com/sponsors/tmm)

React Hooks for Ethereum, built on [ethers.js](https://github.com/ethers-io/ethers.js).

## Features

Expand Down Expand Up @@ -79,7 +52,7 @@ const Page = () => {

Every component inside the `Provider` is set up with the default `InjectedConnector` for connecting wallets and ethers.js [Default Provider](https://docs.ethers.io/v5/api/providers/#providers-getDefaultProvider) for fetching data.

Want to learn more? Check out the [guides](https://wagmi.sh/guides/connect-wallet) or browse the [API docs](https://wagmi.sh/docs/provider).
Want to learn more? Check out the [guides](https://wagmi-xyz.vercel.app/guides/connect-wallet) or browse the [API docs](https://wagmi-xyz.vercel.app/docs/provider).

## Community

Expand Down
42 changes: 42 additions & 0 deletions docs/components/docs/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { useRouter } from 'next/router'

const TITLE_WITH_TRANSLATIONS: Record<string, string> = {
'en-US': 'React Hooks for Ethereum',
}

export const Header = () => {
const { locale, defaultLocale = 'en-US' } = useRouter()
const resolvedLocale = locale || defaultLocale
const title = TITLE_WITH_TRANSLATIONS[resolvedLocale]

return (
<header className="mb-10">
<h1 className="text-center font-extrabold md:text-5xl mt-8">wagmi</h1>

<p className="text-center text-lg mb-6 text-gray-500 md:!text-2xl">
{title}
</p>

<div className="flex gap-4 justify-center">
<a aria-label="Stars" href="https://github.com/tmm/wagmi">
<img
alt=""
src="https://img.shields.io/github/stars/tmm/wagmi?colorA=292929&colorB=3c82f6"
/>
</a>
<a aria-label="Downloads" href="https://www.npmjs.com/package/wagmi">
<img
alt=""
src="https://img.shields.io/npm/dm/wagmi?colorA=292929&colorB=3c82f6"
/>
</a>
<a aria-label="Sponsors" href="https://github.com/sponsors/tmm">
<img
alt=""
src="https://img.shields.io/github/sponsors/tmm?colorA=292929&colorB=3c82f6"
/>
</a>
</div>
</header>
)
}
1 change: 1 addition & 0 deletions docs/components/docs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Header } from './Header'
19 changes: 14 additions & 5 deletions docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.js',
unstable_stork: false,
unstable_contentDump: true,
unstable_flexsearch: true,
unstable_staticImage: true,
})

/** @type {import('next').NextConfig} */
const config = {
// i18n: {
// locales: ['en-US'],
// defaultLocale: 'en-US',
// },
i18n: {
locales: ['en-US'],
defaultLocale: 'en-US',
},
reactStrictMode: true,
redirects: () => {
return [
{
source: '/examples',
destination: '/examples/connect-wallet',
statusCode: 302,
},
]
},
}

module.exports = withNextra(config)
2 changes: 2 additions & 0 deletions docs/pages/_middleware.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { locales } from 'nextra/locales'
export const middleware = locales
73 changes: 0 additions & 73 deletions docs/pages/comparison.mdx

This file was deleted.

50 changes: 0 additions & 50 deletions docs/pages/docs/connectors/coinbaseWallet.mdx

This file was deleted.

44 changes: 0 additions & 44 deletions docs/pages/docs/connectors/injected.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions docs/pages/docs/connectors/meta.json

This file was deleted.

48 changes: 0 additions & 48 deletions docs/pages/docs/connectors/walletConnect.mdx

This file was deleted.

Loading

0 comments on commit 91717b5

Please sign in to comment.