Skip to content

Commit 4c68f6d

Browse files
committed
Remove renderBody in favor of page element base class
1 parent 986a69a commit 4c68f6d

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

packages/site-client/src/entrypoints/element-hydrate.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
import {hydrate} from 'lit/experimental-hydrate.js';
8-
import {renderBody} from '../templates/body.js';
98
import {renderElementPage} from './element.js';
109

1110
const data = (
@@ -16,4 +15,4 @@ const data = (
1615
// We could also remove the attribute manually, or not use deferhydration, but
1716
// instead manually assign the data into the <wco-element-page> element, and
1817
// time imports so that automatic element hydration happend after.
19-
hydrate(renderBody(renderElementPage(...data)), document.body);
18+
hydrate(renderElementPage(...data), document.body);

packages/site-client/src/templates/body.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/site-content/templates/src/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import {
1212

1313
import type {TemplateResult} from 'lit';
1414
import type {DirectiveResult} from 'lit/directive.js';
15-
import {renderBody} from '@webcomponents/internal-site-client/lib/templates/body.js';
1615

1716
import {escapeHTML} from './escape-html.js';
1817
export {unsafeHTML} from 'lit/directives/unsafe-html.js';
18+
export {html} from 'lit';
1919

2020
export function* renderPage(
2121
data: {
@@ -70,7 +70,7 @@ export function* renderPage(
7070
</head>
7171
<body>
7272
`;
73-
yield* render(renderBody(data.content), options);
73+
yield* render(data.content, options);
7474

7575
if (data.initialData !== undefined) {
7676
yield `<script>window.__ssrData = ${JSON.stringify(

0 commit comments

Comments
 (0)