first working example

This commit is contained in:
Tim Bendt
2024-04-19 14:42:42 -06:00
parent cf50f37ede
commit efb5de13cc
3 changed files with 91 additions and 160 deletions

View File

@@ -1,10 +1,10 @@
import { Button, Flex } from "wretched";
import { getAllProjects } from "../services/api-client.js";
const projects = await getAllProjects({ limit: 100 });
const projectsResp = await getAllProjects({ limit: 100, sort_by: "date_updated", sort_dir: "desc" });
export const projectView = Flex.down({
children: projects.map(x => new Button({
children: projectsResp.projects.map(x => new Button({
text: x.name
})
)