-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rainbow-me:main' into main
- Loading branch information
Showing
105 changed files
with
3,047 additions
and
1,327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "https://codesandbox.io/schemas/tasks.json", | ||
"setupTasks": ["yarn add @rainbow-me/rainbowkit@latest", "yarn build"], | ||
"tasks": { | ||
"install-dependencies": { | ||
"name": "Install Dependencies", | ||
"command": "yarn add @rainbow-me/rainbowkit@latest" | ||
}, | ||
"start-app": { | ||
"name": "Run Dev Server", | ||
"command": "yarn dev", | ||
"runAtStart": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# with-next-app | ||
|
||
## 0.0.4 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [d00c777] | ||
- @rainbow-me/rainbowkit@1.0.3 | ||
|
||
## 0.0.3 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [e2b1072] | ||
- Updated dependencies [e2b1072] | ||
- @rainbow-me/rainbowkit@1.0.2 | ||
|
||
## 0.0.2 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [9432a2f] | ||
- Updated dependencies [b2c66ff] | ||
- Updated dependencies [bcb3d18] | ||
- @rainbow-me/rainbowkit@1.0.1 | ||
|
||
## 0.0.1 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [9838acf] | ||
- @rainbow-me/rainbowkit@0.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
This is a [Next.js](https://nextjs.org/) 13 App Router project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import '../styles/global.css'; | ||
import '@rainbow-me/rainbowkit/styles.css'; | ||
import { Providers } from './providers'; | ||
|
||
function RootLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<html lang="en"> | ||
<body> | ||
<Providers>{children}</Providers> | ||
</body> | ||
</html> | ||
); | ||
} | ||
|
||
export default RootLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ConnectButton } from '@rainbow-me/rainbowkit'; | ||
|
||
function Page() { | ||
return ( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
justifyContent: 'flex-end', | ||
padding: 12, | ||
}} | ||
> | ||
<ConnectButton /> | ||
</div> | ||
); | ||
} | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
'use client'; | ||
|
||
import * as React from 'react'; | ||
import { | ||
RainbowKitProvider, | ||
getDefaultWallets, | ||
connectorsForWallets, | ||
} from '@rainbow-me/rainbowkit'; | ||
import { | ||
argentWallet, | ||
trustWallet, | ||
ledgerWallet, | ||
} from '@rainbow-me/rainbowkit/wallets'; | ||
import { configureChains, createConfig, WagmiConfig } from 'wagmi'; | ||
import { | ||
mainnet, | ||
polygon, | ||
optimism, | ||
arbitrum, | ||
zora, | ||
goerli, | ||
} from 'wagmi/chains'; | ||
import { publicProvider } from 'wagmi/providers/public'; | ||
|
||
const { chains, publicClient, webSocketPublicClient } = configureChains( | ||
[ | ||
mainnet, | ||
polygon, | ||
optimism, | ||
arbitrum, | ||
zora, | ||
...(process.env.NEXT_PUBLIC_ENABLE_TESTNETS === 'true' ? [goerli] : []), | ||
], | ||
[publicProvider()] | ||
); | ||
|
||
const projectId = 'YOUR_PROJECT_ID'; | ||
|
||
const { wallets } = getDefaultWallets({ | ||
appName: 'RainbowKit demo', | ||
projectId, | ||
chains, | ||
}); | ||
|
||
const demoAppInfo = { | ||
appName: 'Rainbowkit Demo', | ||
}; | ||
|
||
const connectors = connectorsForWallets([ | ||
...wallets, | ||
{ | ||
groupName: 'Other', | ||
wallets: [ | ||
argentWallet({ projectId, chains }), | ||
trustWallet({ projectId, chains }), | ||
ledgerWallet({ projectId, chains }), | ||
], | ||
}, | ||
]); | ||
|
||
const wagmiConfig = createConfig({ | ||
autoConnect: true, | ||
connectors, | ||
publicClient, | ||
webSocketPublicClient, | ||
}); | ||
|
||
export function Providers({ children }: { children: React.ReactNode }) { | ||
const [mounted, setMounted] = React.useState(false); | ||
React.useEffect(() => setMounted(true), []); | ||
return ( | ||
<WagmiConfig config={wagmiConfig}> | ||
<RainbowKitProvider chains={chains} appInfo={demoAppInfo}> | ||
{mounted && children} | ||
</RainbowKitProvider> | ||
</WagmiConfig> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
experimental: { | ||
appDir: true, | ||
}, | ||
webpack: config => { | ||
config.resolve.fallback = { fs: false, net: false, tls: false }; | ||
return config; | ||
}, | ||
}; | ||
|
||
module.exports = nextConfig; |
Oops, something went wrong.