summaryrefslogtreecommitdiff
path: root/examples/ssr
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ssr')
-rw-r--r--examples/ssr/src/components/ProductListing.astro28
-rw-r--r--examples/ssr/src/components/TextDecorationSkip.astro14
-rw-r--r--examples/ssr/src/pages/cart.astro14
3 files changed, 31 insertions, 25 deletions
diff --git a/examples/ssr/src/components/ProductListing.astro b/examples/ssr/src/components/ProductListing.astro
index 96b6ea581..14e6e1d8c 100644
--- a/examples/ssr/src/components/ProductListing.astro
+++ b/examples/ssr/src/components/ProductListing.astro
@@ -52,17 +52,19 @@ const { products } = Astro.props;
</style>
<slot name="title" />
<ul>
- {products.map((product) => (
- <li class="product">
- <a href={`/products/${product.id}`}>
- <figure>
- <img src={product.image} />
- <figcaption>
- <div class="name">{product.name}</div>
- <div class="price">${product.price}</div>
- </figcaption>
- </figure>
- </a>
- </li>
- ))}
+ {
+ products.map((product) => (
+ <li class="product">
+ <a href={`/products/${product.id}`}>
+ <figure>
+ <img src={product.image} />
+ <figcaption>
+ <div class="name">{product.name}</div>
+ <div class="price">${product.price}</div>
+ </figcaption>
+ </figure>
+ </a>
+ </li>
+ ))
+ }
</ul>
diff --git a/examples/ssr/src/components/TextDecorationSkip.astro b/examples/ssr/src/components/TextDecorationSkip.astro
index 524732d04..707027763 100644
--- a/examples/ssr/src/components/TextDecorationSkip.astro
+++ b/examples/ssr/src/components/TextDecorationSkip.astro
@@ -13,9 +13,11 @@ const last = words.length - 1;
text-decoration: underline;
}
</style>
-{words.map((word, i) => (
- <Fragment>
- <span>{word}</span>
- {i !== last && <Fragment>&#32;</Fragment>}
- </Fragment>
-))}
+{
+ words.map((word, i) => (
+ <Fragment>
+ <span>{word}</span>
+ {i !== last && <Fragment>&#32;</Fragment>}
+ </Fragment>
+ ))
+}
diff --git a/examples/ssr/src/pages/cart.astro b/examples/ssr/src/pages/cart.astro
index d153e3ea9..ebc2f1472 100644
--- a/examples/ssr/src/pages/cart.astro
+++ b/examples/ssr/src/pages/cart.astro
@@ -36,12 +36,14 @@ const cart = await getCart(Astro.request);
</tr>
</thead>
<tbody>
- {cart.items.map((item) => (
- <tr>
- <td>{item.name}</td>
- <td>{item.count}</td>
- </tr>
- ))}
+ {
+ cart.items.map((item) => (
+ <tr>
+ <td>{item.name}</td>
+ <td>{item.count}</td>
+ </tr>
+ ))
+ }
</tbody>
</table>
</Container>