La in dapper, och routing. fixade upp lite exempelsidor

This commit is contained in:
2025-09-09 17:15:11 +02:00
parent 8c54a120d1
commit 01e341fce0
15 changed files with 260 additions and 24 deletions

View File

@@ -0,0 +1,22 @@
import { createSignal, onMount, For, type Component } from "solid-js";
import AuthorCard from "./AuthorCard";
import BibblanService from "../services/bibblanservice";
import { author } from "../types/types";
const BookList: Component = () => {
const [authors, setAuthors] = createSignal<author[]>([]);
onMount(() => {
BibblanService.getAuthors().then(setAuthors);
});
return (
<div>
<h1>Books!</h1>
<div class="book-grid d-flex flex-wrap justify-content-between gap-3 p-3">
<For each={authors()}>{(item) => <AuthorCard author={item} />}</For>
</div>
</div>
);
};
export default BookList;