---
  const response = await fetch('https://curriculum-app-api.beanstalkedu.com/items/blog');
  const data = await response.json();
export async function getStaticPaths() {
  const response = await fetch('https://curriculum-app-api.beanstalkedu.com/items/blog');
  const data = await response.json();
  const finalData = data.data.map((n: { slug: any; })=>{
      return {params: {id:n.slug}}
  })
  console.log(finalData)
  return finalData;
}

const { id } = Astro.params;
const idx = data.data.findIndex(n => n.slug ===id);
---
<h1>{id}</h1>
{data.data[idx].slug} <br>
{data.data[idx].status} <br>
{data.data[idx].title} <br>
{data.data[idx].property} <br>