You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
import getPosts from "./blog";
|
|
|
|
export const dynamic = 'auto',
|
|
dynamicParams = true,
|
|
revalidate = false,
|
|
fetchCache = 'force-no-cache',
|
|
runtime = 'nodejs',
|
|
preferredRegion = 'auto'
|
|
|
|
export default async function Page({ children }) {
|
|
const posts = await getPosts;
|
|
console.log(posts)
|
|
return(
|
|
<div>
|
|
<div>
|
|
{posts.items.map((item, i) => (
|
|
<div key={i}>
|
|
<h1>
|
|
{item.title}
|
|
</h1>
|
|
<br/>
|
|
{console.log(item["@expand"])}
|
|
{item["@expand"].categories.map((item, i) => (
|
|
<div key={i}>
|
|
{item.name}
|
|
</div>
|
|
))}
|
|
<br/>
|
|
{item.title}
|
|
<br/>
|
|
<br/>
|
|
{item.content}
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
} |