Skip to content

Commit

Permalink
Update routing for EVM and Solana next examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dankelleher committed Aug 26, 2024
1 parent 84e10ef commit 7d8ff0a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 9 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ This monorepo contains a suite of demo apps, all using Civic Pass to gate access

## Demo Deployments

[EVM (Polygon Amoy)](https://airdrop-demo.civic.me/evm)

[Solana (devnet)](https://airdrop-demo.civic.me/solana)
[EVM Vite (Polygon Amoy)](https://airdrop-demo.civic.me/evm)
[Solana Vite (devnet)](https://airdrop-demo.civic.me/solana)
[EVM NextJs (Polygon Amoy)](https://airdrop-demo.civic.me/next/evm)
[Solana NextJs (devnet)](https://airdrop-demo.civic.me/next/solana)

## Getting Started

Expand All @@ -20,8 +21,8 @@ Then navigate to the app:

| Chain | | |
|--------|-------------------------------|--------------------------------------------------|
| EVM | [Vite](/packages/evm/vite) | [NextJS TODO coming soon](/packages/evm/next) |
| Solana | [Vite](/packages/solana/vite) | [NextJS TODO coming soon](/packages/solana/next) |
| EVM | [Vite](/packages/evm/vite) | [NextJS](/packages/evm/next) |
| Solana | [Vite](/packages/solana/vite) | [NextJS](/packages/solana/next) |

Where appropriate, copy `.env.example` to `.env` and populate the fields.

Expand Down
8 changes: 6 additions & 2 deletions packages/evm/next/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
// Following the advice at https://github.com/vercel/vercel/discussions/5848 for handling rewrites/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: '/next/evm',
assetPrefix: "/next/evm",
trailingSlash: false
};

export default nextConfig;
8 changes: 6 additions & 2 deletions packages/solana/next/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
// Following the advice at https://github.com/vercel/vercel/discussions/5848 for handling rewrites/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: '/next/solana',
assetPrefix: "/next/solana",
trailingSlash: false
};

export default nextConfig;
17 changes: 17 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"trailingSlash": false,
"rewrites": [
{
"source": "/solana/:path*",
Expand All @@ -7,6 +8,22 @@
{
"source": "/evm/:path*",
"destination": "https://civic-pass-demos-evm-vite.vercel.app/:path*"
},
{
"source": "/next/solana",
"destination": "https://civic-pass-demos-solana-next.vercel.app/next/solana"
},
{
"source": "/next/solana/:path*",
"destination": "https://civic-pass-demos-solana-next.vercel.app/next/solana/:path*"
},
{
"source": "/next/evm",
"destination": "https://civic-pass-demos-evm-next.vercel.app/next/evm"
},
{
"source": "/next/evm/:path*",
"destination": "https://civic-pass-demos-evm-next.vercel.app/next/evm/:path*"
}
],
"redirects": [{
Expand Down

0 comments on commit 7d8ff0a

Please sign in to comment.