0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

[ci] format

This commit is contained in:
ematipico 2023-05-04 14:25:03 +00:00 committed by fredkbot
parent ca329bbcae
commit 14fd198ea5
4 changed files with 7 additions and 7 deletions

View file

@ -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 () => {

View file

@ -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 });
}

View file

@ -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;

View file

@ -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) {