[ci] format

This commit is contained in:
matthewp 2022-05-12 16:06:40 +00:00 committed by github-actions[bot]
parent 678c2b7523
commit 8666f22a0f
2 changed files with 6 additions and 10 deletions

View file

@ -2,14 +2,12 @@ import { createElement } from 'react';
import { render, hydrate } from 'react-dom';
import StaticHtml from './static-html.js';
export default (element) => (Component, props, children, { client }) =>
{
export default (element) =>
(Component, props, children, { client }) => {
const componentEl = createElement(
Component,
props,
children != null
? createElement(StaticHtml, { value: children })
: children
children != null ? createElement(StaticHtml, { value: children }) : children
);
if (client === 'only') {
return render(componentEl, element);

View file

@ -2,14 +2,12 @@ import { createElement } from 'react';
import { createRoot, hydrateRoot } from 'react-dom/client';
import StaticHtml from './static-html.js';
export default (element) => (Component, props, children, { client }) =>
{
export default (element) =>
(Component, props, children, { client }) => {
const componentEl = createElement(
Component,
props,
children != null
? createElement(StaticHtml, { value: children })
: children
children != null ? createElement(StaticHtml, { value: children }) : children
);
if (client === 'only') {
return createRoot(element).render(componentEl);