import { getlabelRatio } from "@/utils/querys/production/labelRatio";
import { labelRatioColumns } from "@/utils/tableData/production/labelRatio/labelRatioColumns";
import { LabelRatioTable } from "@/utils/tableData/production/labelRatio/labelRatioData";
import { useQuery } from "@tanstack/react-query";

export default function LabelRatio() {
    const { data, isError, isLoading } = useQuery(getlabelRatio());

    const ratioData = data ? data : [];
    if (isError) {
        return <div>Error</div>;
    }

    if (isLoading) {
        return <div>Loading</div>;
    }

    return (
        <div className="m-2">
            <LabelRatioTable
                columns={labelRatioColumns}
                data={ratioData}
                //style={style}
            />
        </div>
    );
}
