atmosphere explorer pds.ls
tool typescript atproto
Something went wrong. Try again.
469 B · 21 lines
TSX
at main
12345678910111213141516171819202122import { JSX, Show, Suspense } from "solid-js";
import { Spinner } from "./spinner.jsx";
export const NestedLayout = (props: { key: string | undefined; hasChild: boolean; view: () => JSX.Element; children: JSX.Element;}) => ( <Show keyed when={props.key}> {(_) => ( <> <Show when={props.hasChild}> <Suspense fallback={<Spinner />}>{props.children}</Suspense> </Show> {props.view()} </> )} </Show>);