mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-29 20:15:41 +00:00
18 lines
350 B
TypeScript
18 lines
350 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,
|
||
|
});
|
||
|
return data.items;
|
||
|
});
|
||
|
|
||
|
return computed(() => {
|
||
|
return {
|
||
|
items: items.value || [],
|
||
|
};
|
||
|
});
|
||
|
}
|