forked from mirrors/homebox
4dd925caf0
* remove overflow-hidden on when no collapsed * fix recently added on homescreen * fix delete account formatting * add manufacturer to search * move nav button to left
18 lines
378 B
TypeScript
18 lines
378 B
TypeScript
import { UserClient } from "~~/lib/api/user";
|
|
|
|
export function itemsTable(api: UserClient) {
|
|
const { data: items } = useAsyncData(async () => {
|
|
const { data } = await api.items.getAll({
|
|
page: 1,
|
|
pageSize: 5,
|
|
orderBy: "createdAt",
|
|
});
|
|
return data.items;
|
|
});
|
|
|
|
return computed(() => {
|
|
return {
|
|
items: items.value || [],
|
|
};
|
|
});
|
|
}
|