summaryrefslogtreecommitdiff
path: root/packages/integrations/preact/client.js
diff options
context:
space:
mode:
authorGravatar natemoo-re <natemoo-re@users.noreply.github.com> 2022-06-23 15:12:46 +0000
committerGravatar github-actions[bot] <github-actions[bot]@users.noreply.github.com> 2022-06-23 15:12:46 +0000
commit059d00bd5d4bd2b64cb7d321d1ebf9c1ba44c625 (patch)
tree9b0d289c9fb3df8dd50eff8f6176f8117c0f6084 /packages/integrations/preact/client.js
parent7373d61cdcaedd64bf5fd60521b157cfa4343558 (diff)
downloadastro-059d00bd5d4bd2b64cb7d321d1ebf9c1ba44c625.tar.gz
astro-059d00bd5d4bd2b64cb7d321d1ebf9c1ba44c625.tar.zst
astro-059d00bd5d4bd2b64cb7d321d1ebf9c1ba44c625.zip
[ci] format
Diffstat (limited to 'packages/integrations/preact/client.js')
-rw-r--r--packages/integrations/preact/client.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/packages/integrations/preact/client.js b/packages/integrations/preact/client.js
index e2f4ca803..78d8720f0 100644
--- a/packages/integrations/preact/client.js
+++ b/packages/integrations/preact/client.js
@@ -1,13 +1,14 @@
import { h, render } from 'preact';
import StaticHtml from './static-html.js';
-export default (element) => (Component, props, { default: children, ...slotted }) => {
- if (!element.hasAttribute('ssr')) return;
- for (const [key, value] of Object.entries(slotted)) {
- props[key] = h(StaticHtml, { value, name: key });
- }
- render(
- h(Component, props, children != null ? h(StaticHtml, { value: children }) : children),
- element
- );
-};
+export default (element) =>
+ (Component, props, { default: children, ...slotted }) => {
+ if (!element.hasAttribute('ssr')) return;
+ for (const [key, value] of Object.entries(slotted)) {
+ props[key] = h(StaticHtml, { value, name: key });
+ }
+ render(
+ h(Component, props, children != null ? h(StaticHtml, { value: children }) : children),
+ element
+ );
+ };