Files
hanzo.ai/app/beta/_door.tsx
zeekay 4bc1f0aeb3 beta: the app's Betas pane is the portal however it is reached
Only /beta's door handed the app the portal, so a member who opened Betas
from the rail or anywhere else inside the app got @hanzo/app's plain list.
The app mount itself carries the portal now, fetched when Betas opens.

Claude-Session: https://claude.ai/code/session_017vrVus6PPBgP5YRzKV1iqW
2026-10-25 20:15:54 -07:00

33 lines
968 B
TypeScript

'use client'
// /beta's door: the portal in the site's frame for a stranger, and for a
// signed-in reader the app (@hanzo/app `App`) in its Betas mode, which draws no
// sidebar; its pane is the same portal wherever the app is mounted (../_web.tsx). Behind the same gate as `/`
// (../_apex.tsx), so the site's frame is never painted at someone who is in.
import type { ReactNode } from 'react'
import dynamic from 'next/dynamic'
import { Room } from '@/components/app'
import { Apex } from '../_apex'
/** The app, fetched only for a signed-in reader. */
const App = dynamic(() => import('../_web'), { ssr: false })
/** A stranger at /beta reads the portal; nothing about the address asks for a sign-in. */
const stranger = (): boolean => false
export function Door({ children }: { children: ReactNode }) {
return (
<Apex
placed={stranger}
app={
<Room>
<App />
</Room>
}
>
{children}
</Apex>
)
}