mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-09-30 20:46:32 +00:00
Two duplications, both removed. 1. The header's account cluster was an email in a <span> and a Sign out button. It is now <OrgSwitcher/> + <UserMenu/> from @luxfi/ui — the same controls the MPC dashboard and lux.market render, reading the same IAM verbs (get-account, get-organizations, get-organization-projects), with the same phone sheet, which this bar had no equivalent of at all. Signed out they offer sign-in rather than showing an empty list that reads as an account with no organizations. 2. lib/brand.ts held a SECOND host→brand table. It kept what is genuinely its own — logos, taglines, palettes, footer links, the ecosystem launcher, the API origins that answer — and now takes issuer, client id and IAM host from @luxfi/ui/white-label, which is the same resolver every Lux surface already uses. Two copies of one fact is two things to get wrong, and these two DID disagree: this table had Zoo on zoolabs.id (right) and the shared one on id.zoo.network (an alias whose own discovery document names zoolabs.id, so a client on it rejects every token). The shared table is fixed; this file no longer has an opinion to be wrong about. The bundler wiring for the gui engine comes from `withLuxUi` — the one place it lives, rather than a hand-rolled transpile list per app. `next build` passes (static export, every route emitted). `pnpm test` 26/26, including the assertion that lux.cloud + lux-cloud + https://lux.cloud/auth/callback — the one login that works today — is unchanged. Co-authored-by: Hanzo Dev <[email protected]>
43 lines
1.6 KiB
TypeScript
43 lines
1.6 KiB
TypeScript
import type { NextConfig } from "next"
|
|
import { withLuxUi } from "@luxfi/ui/next"
|
|
|
|
const nextConfig: NextConfig = {
|
|
// Modern React & Next.js features
|
|
reactStrictMode: true,
|
|
poweredByHeader: false,
|
|
|
|
// Static export for Cloudflare Pages (lux.cloud).
|
|
// The app is client-rendered (auth via localStorage, brand auto-detected from
|
|
// window.location.hostname in lib/brand.ts), so a static export serves the full
|
|
// console as static assets on Pages' CDN — no edge/Node server required.
|
|
output: "export",
|
|
devIndicators: false,
|
|
|
|
// Turbopack configuration (required for Next.js 16)
|
|
turbopack: {},
|
|
|
|
// Image optimization is unavailable in static export; serve images as-is.
|
|
images: {
|
|
unoptimized: true,
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: "**",
|
|
},
|
|
],
|
|
formats: ['image/avif', 'image/webp']
|
|
},
|
|
|
|
// NOTE: headers() and redirects() are not supported by `output: "export"`.
|
|
// Security headers are applied by Cloudflare Pages via public/_headers, and
|
|
// the legacy /admin -> /dashboard redirect is handled by public/_redirects.
|
|
}
|
|
|
|
// `withLuxUi` is the ONE place the @hanzo/gui engine's bundler wiring lives —
|
|
// transpile list, react-native → react-native-web alias in both bundlers, the
|
|
// platform defines, and the single-copy dedupe. Every Next surface needed the
|
|
// identical incantation; the ones that hand-rolled it each transpiled a
|
|
// different subset, which is how one app renders a Sheet and the next throws on
|
|
// the same component.
|
|
export default withLuxUi({ ...nextConfig, dir: __dirname } as never) as NextConfig
|