15 lines
298 B
TypeScript
15 lines
298 B
TypeScript
import { PushFn } from '../renderToString'
|
|
|
|
export async function ssrRenderSuspense(
|
|
push: PushFn,
|
|
{ default: renderContent }: Record<string, (() => void) | undefined>
|
|
) {
|
|
if (renderContent) {
|
|
push(`<!--[-->`)
|
|
renderContent()
|
|
push(`<!--]-->`)
|
|
} else {
|
|
push(`<!---->`)
|
|
}
|
|
}
|