mirror of
https://github.com/visortelle/haskell-spotlight.git
synced 2024-09-11 03:55:54 +03:00
19 lines
511 B
TypeScript
19 lines
511 B
TypeScript
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import documentStyles from './document.css';
|
|
import Content from './Content';
|
|
import * as lib from '@haskell-spotlight/react-lib'
|
|
|
|
export function render({ to }: { to: HTMLElement }) {
|
|
ReactDOM.render(
|
|
(
|
|
<lib.appContext.DefaultAppContextProvider useNextJSRouting={false} asWebExtension={true}>
|
|
<Content rootElement={to} />
|
|
</lib.appContext.DefaultAppContextProvider>
|
|
),
|
|
to.shadowRoot
|
|
);
|
|
|
|
documentStyles.use();
|
|
}
|