summaryrefslogtreecommitdiff
path: root/packages/integrations
diff options
context:
space:
mode:
authorGravatar ematipico <ematipico@users.noreply.github.com> 2023-05-04 14:25:03 +0000
committerGravatar fredkbot <fred+astrobot@astro.build> 2023-05-04 14:25:03 +0000
commit14fd198ea51eb401c6e51970b69d85c17fc4fa7b (patch)
tree7799b229a9bda15b69dd701f0e10642f66f60259 /packages/integrations
parentca329bbcae7a6075af4f428f6f64466e9d152c8f (diff)
downloadastro-14fd198ea51eb401c6e51970b69d85c17fc4fa7b.tar.gz
astro-14fd198ea51eb401c6e51970b69d85c17fc4fa7b.tar.zst
astro-14fd198ea51eb401c6e51970b69d85c17fc4fa7b.zip
[ci] format
Diffstat (limited to 'packages/integrations')
-rw-r--r--packages/integrations/react/client.js4
-rw-r--r--packages/integrations/react/context.js2
-rw-r--r--packages/integrations/react/server.js6
3 files changed, 6 insertions, 6 deletions
diff --git a/packages/integrations/react/client.js b/packages/integrations/react/client.js
index 366d499e3..ef5929af1 100644
--- a/packages/integrations/react/client.js
+++ b/packages/integrations/react/client.js
@@ -14,8 +14,8 @@ export default (element) =>
(Component, props, { default: children, ...slotted }, { client }) => {
if (!element.hasAttribute('ssr')) return;
const renderOptions = {
- identifierPrefix: element.getAttribute('prefix')
- }
+ identifierPrefix: element.getAttribute('prefix'),
+ };
for (const [key, value] of Object.entries(slotted)) {
props[key] = createElement(StaticHtml, { value, name: key });
}
diff --git a/packages/integrations/react/context.js b/packages/integrations/react/context.js
index 5d9b1d7b1..2e3e37fd5 100644
--- a/packages/integrations/react/context.js
+++ b/packages/integrations/react/context.js
@@ -17,7 +17,7 @@ function getContext(rendererContextResult) {
}
export function incrementId(rendererContextResult) {
- const ctx = getContext(rendererContextResult)
+ const ctx = getContext(rendererContextResult);
const id = ctx.id;
ctx.currentIndex++;
return id;
diff --git a/packages/integrations/react/server.js b/packages/integrations/react/server.js
index 0d85984f9..3f7e786ac 100644
--- a/packages/integrations/react/server.js
+++ b/packages/integrations/react/server.js
@@ -61,7 +61,7 @@ async function getNodeWritable() {
async function renderToStaticMarkup(Component, props, { default: children, ...slotted }, metadata) {
let prefix;
if (this && this.result) {
- prefix = incrementId(this.result)
+ prefix = incrementId(this.result);
}
const attrs = { prefix };
@@ -82,8 +82,8 @@ async function renderToStaticMarkup(Component, props, { default: children, ...sl
}
const vnode = React.createElement(Component, newProps);
const renderOptions = {
- identifierPrefix: prefix
- }
+ identifierPrefix: prefix,
+ };
let html;
if (metadata && metadata.hydrate) {
if ('renderToReadableStream' in ReactDOM) {