Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Oct 18, 2022
1 parent 5923dd7 commit 1f57c0c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
11 changes: 4 additions & 7 deletions examples/ssr/src/pages/login.astro
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ import Container from '../components/Container.astro';
})
.then((res) => res.json())
.then((data) => {
document.querySelector("#result").innerHTML = "Progressive login was successful! you will be redirected to the store in 3 seconds";
setTimeout(
() => location.href = "/",
3000
);

document.querySelector('#result').innerHTML =
'Progressive login was successful! you will be redirected to the store in 3 seconds';
setTimeout(() => (location.href = '/'), 3000);
});
});
});
Expand All @@ -52,7 +49,7 @@ import Container from '../components/Container.astro';

<input type="submit" value="Submit" />
</form>
<div id="result"></div>
<div id="result"></div>
</Container>
</body>
</html>
16 changes: 8 additions & 8 deletions packages/astro/src/vite-plugin-astro-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,14 @@ async function handleRoute(
if (computedMimeType) {
contentType = computedMimeType;
}
const response = new Response(result.body, {
status: 200,
headers: {
'Content-Type': `${contentType};charset=utf-8`,
},
});
attachToResponse(response, result.cookies);
await writeWebResponse(res, response);
const response = new Response(result.body, {
status: 200,
headers: {
'Content-Type': `${contentType};charset=utf-8`,
},
});
attachToResponse(response, result.cookies);
await writeWebResponse(res, response);
}
} else {
const result = await renderPage(options);
Expand Down

0 comments on commit 1f57c0c

Please sign in to comment.