add react-query
This commit is contained in:
@@ -2,8 +2,11 @@ import { Flex, Grid, Select, Stack, Text, TextInput, Title } from "@mantine/core
|
||||
import { t } from "../../config/i18n";
|
||||
import { IconUser } from "@tabler/icons-react";
|
||||
import ShipmentCard from "../../components/ShipmentCard";
|
||||
import { getForm } from "../../services/api";
|
||||
|
||||
export function ContractForm() {
|
||||
const { isPending, error, data } = getForm(1);
|
||||
console.log(isPending, error, data);
|
||||
return (
|
||||
<Flex
|
||||
w={{base: "100%", sm: "50%", lg: "60%"}}
|
||||
@@ -50,11 +53,13 @@ export function ContractForm() {
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Text>{t("products reccurent phase")}</Text>
|
||||
{isPending ||
|
||||
<Select
|
||||
label={`${t("select reccurent product")} (${t("this product will be distributed for all shipments")})`}
|
||||
placeholder={t("select reccurent product")}
|
||||
data={["qwe", "qweqwe", "qweqweqwe"]}
|
||||
data={data?.productor?.products.map(el=> el.name)}
|
||||
/>
|
||||
}
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Text>{t("products planned phase")}</Text>
|
||||
|
||||
Reference in New Issue
Block a user