Updated client packages

This commit is contained in:
Donkie
2026-01-06 01:40:59 +01:00
parent 848f5dcc94
commit b627e151a8
27 changed files with 2603 additions and 1840 deletions

View File

@@ -6,8 +6,8 @@ import Title from "antd/es/typography/Title";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
import React, { ReactNode } from "react";
import { Link } from "react-router";
import { Trans } from "react-i18next";
import { Link } from "react-router";
import Logo from "../../icon.svg?react";
import { ISpool } from "../spools/model";
@@ -32,7 +32,7 @@ export const Home: React.FC<IResourceComponentsProps> = () => {
pagination: { pageSize: 1 },
});
const hasSpools = !spools.data || spools.data.data.length > 0;
const hasSpools = !spools.result || spools.result.data.length > 0;
const ResourceStatsCard = (props: { loading: boolean; value: number; resource: string; icon: ReactNode }) => (
<Col xs={12} md={6}>
@@ -89,20 +89,20 @@ export const Home: React.FC<IResourceComponentsProps> = () => {
<Row justify="center" gutter={[16, 16]} style={{ marginTop: "3em" }}>
<ResourceStatsCard
resource="spool"
value={spools.data?.total || 0}
loading={spools.isLoading}
value={spools.result?.total || 0}
loading={spools.query.isLoading}
icon={<FileOutlined />}
/>
<ResourceStatsCard
resource="filament"
value={filaments.data?.total || 0}
loading={filaments.isLoading}
value={filaments.result?.total || 0}
loading={filaments.query.isLoading}
icon={<HighlightOutlined />}
/>
<ResourceStatsCard
resource="vendor"
value={vendors.data?.total || 0}
loading={vendors.isLoading}
value={vendors.result?.total || 0}
loading={vendors.query.isLoading}
icon={<UserOutlined />}
/>
</Row>