You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
444 B
TypeScript

import renderToString from 'preact-render-to-string'
// import { App } from './App'
import { MetadataContext } from './hooks'
import { RenderedPage } from '../shared/ssr'
export default (url: string): RenderedPage => {
const metadata = {}
const html = renderToString(
<MetadataContext.Provider value={metadata}>
{/* <App url={url} /> */}
</MetadataContext.Provider>
)
return { html, metadata }
}