mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-29 07:20:43 +00:00
Every import, the catalog pin and the docs name @hanzo/app and github.com/hanzoai/app. lib/rooms.ts is lib/app.ts and components/rooms.tsx is components/app.tsx.
34 lines
992 B
TypeScript
34 lines
992 B
TypeScript
'use client'
|
|
|
|
// /studio's door: Studio's landing for a stranger, the app in Studio for a
|
|
// signed-in reader (@hanzo/app `App`, whose third mode is @hanzo/studio),
|
|
// behind the same gate as `/` (../_apex.tsx), so the landing is never painted
|
|
// at someone who is in. Every path under /studio is this page (universe
|
|
// `hanzo-ai-studio`); the app reads the rest of the address.
|
|
|
|
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 /studio reads the landing; 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>
|
|
)
|
|
}
|