18 lines
309 B
Text
18 lines
309 B
Text
---
|
|
import { api } from '../../../lib/api';
|
|
|
|
const { secret } = Astro.props;
|
|
|
|
|
|
export async function getStaticPaths() {
|
|
const response = await api.approveNewsletter(secret);
|
|
|
|
return response.map(product => ({
|
|
params: { id: product.id },
|
|
props: { product }
|
|
}));
|
|
}
|
|
|
|
---
|
|
|
|
<h1>{product.name}</h1>
|