mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
* refactored adapters to run test suites * fix bun version for tests * added missing adapter tests and refactored examples to use `bknd.config.ts` where applicable
31 lines
700 B
Plaintext
31 lines
700 B
Plaintext
---
|
|
import { getApi } from "../bknd";
|
|
import Card from "../components/Card.astro";
|
|
import Layout from "../layouts/Layout.astro";
|
|
|
|
const api = await getApi(Astro);
|
|
const { data } = await api.data.readMany("todos");
|
|
---
|
|
|
|
<Layout title="Welcome to Astro.">
|
|
<p slot="context">Static Rendering</p>
|
|
<ul role="list" class="link-card-grid">
|
|
{data.map((todo: any) => (
|
|
<Card
|
|
done={todo.done}
|
|
title={todo.title}
|
|
body={todo.description}
|
|
/>
|
|
))}
|
|
</ul>
|
|
</Layout>
|
|
|
|
<style>
|
|
.link-card-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
|
|
gap: 2rem;
|
|
padding: 0;
|
|
}
|
|
</style>
|