Skip to content
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
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,23 @@ command and `npx opennextjs-cloudflare deploy` as the deploy command. Set the
the bundle at build time, and set `SEATLAYER_SECRET_KEY` as a secret on the
worker.

`npm run deploy` creates your own Worker named `seatlayer-nextjs-example`, with
no custom domain. Rename it in `wrangler.jsonc` if you like.

### Hosting our copy

The live demo at examples.seatlayer.io is this repository deployed with the
`hosted` environment in `wrangler.jsonc`, which sets the Worker name
`seatlayer-examples`, the custom domain and the matching
`WORKER_SELF_REFERENCE` service:

```sh
npm run deploy:hosted
```

Its `NEXT_PUBLIC_` variables are set at build time and `SEATLAYER_SECRET_KEY`
is a Worker secret. You do not need this environment for your own copy.

Two extras help when the examples are shown inside another page:

- Add `?embed=1` to any route to hide the navigation and the route heading, so
Expand Down
6 changes: 6 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ h2 {
min-height: 420px;
}

/* The season picker draws its offer and steps above the map, so it takes the
height it needs instead of the fixed map height. */
.seatmap.seatmap--season {
height: auto;
}

.seat-list {
list-style: none;
margin: 0 0 12px;
Expand Down
2 changes: 1 addition & 1 deletion components/SeasonWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const SeasonWidget = forwardRef<SeasonPickerHandle, SeasonWidgetProps>(fu
season={seasonKey}
publicKey={publicKey}
maxSelection={4}
className="seatmap"
className="seatmap seatmap--season"
offer={{
eyebrow: "2027 membership",
priceLabel: "From $480",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"start": "next start",
"preview": "opennextjs-cloudflare build && opennextjs-cloudflare preview",
"deploy": "opennextjs-cloudflare build && opennextjs-cloudflare deploy",
"deploy:hosted": "opennextjs-cloudflare build && opennextjs-cloudflare deploy --env hosted",
"cf-typegen": "wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts"
},
"dependencies": {
Expand Down
23 changes: 18 additions & 5 deletions wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
// Cloudflare Workers configuration for the OpenNext adapter.
// Guide: https://opennext.js.org/cloudflare/get-started
// `npm run deploy` deploys your own copy under the name below, with no custom
// domain. The "hosted" environment is the SeatLayer copy on
// examples.seatlayer.io; you do not need it.
"$schema": "node_modules/wrangler/config-schema.json",
"name": "seatlayer-examples",
"name": "seatlayer-nextjs-example",
"main": ".open-next/worker.js",
"compatibility_date": "2026-09-01",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
// The live demo site linked from docs.seatlayer.io.
"routes": [{ "pattern": "examples.seatlayer.io", "custom_domain": true }],
"assets": {
"directory": ".open-next/assets",
"binding": "ASSETS"
Expand All @@ -17,7 +18,19 @@
// Self reference used by the OpenNext cache. The service name must match
// the worker name above.
"binding": "WORKER_SELF_REFERENCE",
"service": "seatlayer-examples"
"service": "seatlayer-nextjs-example"
}
]
],
"env": {
"hosted": {
"name": "seatlayer-examples",
"routes": [{ "pattern": "examples.seatlayer.io", "custom_domain": true }],
"services": [
{
"binding": "WORKER_SELF_REFERENCE",
"service": "seatlayer-examples"
}
]
}
}
}
Loading