Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and github-actions[bot] committed May 12, 2022
1 parent 678c2b7 commit 8666f22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions packages/integrations/react/client-v17.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 3 additions & 5 deletions packages/integrations/react/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8666f22

Please sign in to comment.