mirror of
https://github.com/withastro/astro.git
synced 2025-03-24 23:21:57 -05:00
36 lines
740 B
Text
36 lines
740 B
Text
---
|
|
import Header from '../components/Header.astro';
|
|
import Container from '../components/Container.astro';
|
|
import ProductListing from '../components/ProductListing.astro';
|
|
import { getProducts } from '../api';
|
|
import '../styles/common.css';
|
|
|
|
const products = await getProducts(Astro.request);
|
|
---
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<title>Online Store</title>
|
|
<style>
|
|
h1 {
|
|
font-size: 36px;
|
|
}
|
|
|
|
.product-listing-title {
|
|
text-align: center;
|
|
}
|
|
|
|
.product-listing {
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<Header />
|
|
|
|
<Container tag="main">
|
|
<ProductListing products={products} class="product-listing">
|
|
<h2 class="product-listing-title" slot="title">Product Listing</h2>
|
|
</ProductListing>
|
|
</Container>
|
|
</body>
|
|
</html>
|