Refactoring to Typescript...
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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 }
|
||||
}
|
||||
Reference in New Issue
Block a user