mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-10-25 02:31:30 +00:00
Names the two halves for what they are. The repo already holds both (12407e9 merged bootnode/bootnode into this history); this makes the frontend directory say so, so the layout reads the way the owner describes the system: backend and frontend separate, one repo. git mv throughout — 187 renames, history preserved. Every path reference follows: hanzo.yml build context and dockerfile, compose.yml, compose.prod.yml, start.sh, LLM.md, infra/k8s/web-deployments.yaml, infra/cloud/deploy.sh, and the Dockerfile's own COPY paths. Image and container names (bootnode-web, the -web tag suffix) are deliberately NOT renamed here: those are a deploy contract the App CR and ingress bind to on port 3001, and breaking them is a separate, staged change. Console builds green after the move; the Go tree builds. Co-authored-by: Hanzo Dev <[email protected]>
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
"use client"
|
|
|
|
import { ThemeProvider as NextThemesProvider } from "next-themes"
|
|
import { useBrand } from "@/components/brand-provider"
|
|
|
|
/**
|
|
* Theming, white-labelled by hostname.
|
|
*
|
|
* The brand owns its default colour scheme, so the caller passes no
|
|
* `defaultTheme` — that would be a build-time constant, and one build serves
|
|
* every host. next-themes only consults `defaultTheme` on mount, so the
|
|
* provider is keyed on the brand: when BrandProvider re-resolves the host after
|
|
* hydration, a brand with a different default remounts next-themes and the
|
|
* default actually applies. A visitor's own explicit choice still wins — it is
|
|
* in localStorage, which is origin-scoped, so each white-label host remembers
|
|
* its own preference independently.
|
|
*/
|
|
export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
|
const brand = useBrand()
|
|
return (
|
|
<NextThemesProvider
|
|
key={brand.key}
|
|
attribute="class"
|
|
defaultTheme={brand.defaultTheme}
|
|
enableSystem={false}
|
|
disableTransitionOnChange
|
|
>
|
|
{children}
|
|
</NextThemesProvider>
|
|
)
|
|
}
|