mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
refactor(FE): Remove unused imports and redundant code
This commit is contained in:
@@ -60,13 +60,12 @@ const TransferToLayingFormModal = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const { data: transferToLaying, isLoading: isLoadingTransferToLaying } =
|
||||
useSWR(
|
||||
isModalActionForForm && transferToLayingId
|
||||
? ['detail-transfer-to-laying', transferToLayingId]
|
||||
: undefined,
|
||||
([, id]) => TransferToLayingApi.getSingle(Number(id))
|
||||
);
|
||||
const { data: transferToLaying } = useSWR(
|
||||
isModalActionForForm && transferToLayingId
|
||||
? ['detail-transfer-to-laying', transferToLayingId]
|
||||
: undefined,
|
||||
([, id]) => TransferToLayingApi.getSingle(Number(id))
|
||||
);
|
||||
|
||||
/**
|
||||
* Step 1: General Information
|
||||
@@ -178,7 +177,7 @@ const TransferToLayingFormModal = () => {
|
||||
[router]
|
||||
);
|
||||
|
||||
const [formikInitialValues, setFormikInitialValues] = useState(
|
||||
const [formikInitialValues] = useState(
|
||||
getTransferToLayingFormInitialValues()
|
||||
);
|
||||
|
||||
@@ -238,10 +237,7 @@ const TransferToLayingFormModal = () => {
|
||||
)
|
||||
: undefined;
|
||||
|
||||
const {
|
||||
data: flockSourceKandangsAvailability,
|
||||
isLoading: isLoadingFlockSourceKandangsAvailability,
|
||||
} = useSWR(
|
||||
const { data: flockSourceKandangsAvailability } = useSWR(
|
||||
formik.values.flockSource
|
||||
? [
|
||||
'transfer-to-laying',
|
||||
@@ -297,10 +293,7 @@ const TransferToLayingFormModal = () => {
|
||||
return { available: countAvailable, unavailable: countUnavailable };
|
||||
}, [mappedFlockSourceKandangsAvailability]);
|
||||
|
||||
const {
|
||||
data: flockDestinationKandangsMaxTargetQty,
|
||||
isLoading: isLoadingFlockDestinationKandangsMaxTargetQty,
|
||||
} = useSWR(
|
||||
const { data: flockDestinationKandangsMaxTargetQty } = useSWR(
|
||||
formik.values.flockDestination
|
||||
? [
|
||||
'transfer-to-laying',
|
||||
|
||||
Reference in New Issue
Block a user