---
// const response = await fetch('https://curriculum-app-api.beanstalkedu.com/items/blog/1');
// const data = await response.json();
const response = await fetch('https://randomuser.me/api/');
const data = await response.json();
const randomUser = data.results[0];
console.log(randomUser) // dont see a console log on browser
// const randomUser = data.results[0];

export function getStaticPaths() {
  return [
    { params: { id: '1' } },
    { params: { id: '2' } },
    { params: { id: '3' } }
  ];
}

const { id } = Astro.params;
---
<h1>{id}</h1>
<h1>{id}</h1>

<h1>User</h1>
<h2>{randomUser.name.first} {randomUser.name.last}</h2>