Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored and astrobot-houston committed May 4, 2023
1 parent ca329bb commit 14fd198
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/astro/test/react-component.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('React Components', () => {
// test 11: Should generate unique React.useId per island
const islandsWithId = $('.react-use-id');
expect(islandsWithId).to.have.lengthOf(2);
expect($(islandsWithId[0]).attr('id')).to.not.equal($(islandsWithId[1]).attr('id'))
expect($(islandsWithId[0]).attr('id')).to.not.equal($(islandsWithId[1]).attr('id'));
});

it('Can load Vue', async () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/integrations/react/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/react/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions packages/integrations/react/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };

Expand All @@ -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) {
Expand Down

0 comments on commit 14fd198

Please sign in to comment.