// @ts-nocheck import React from 'react'; import intl from 'react-intl-universal'; import { useWarehouseTransfer } from '@/hooks/query'; import { DrawerHeaderContent, DrawerLoading } from '@/components'; import { DRAWERS } from '@/constants/drawers'; const WarehouseTransferDetailDrawerContext = React.createContext(); /** * Warehouse transfer detail drawer provider. */ function WarehouseTransferDetailDrawerProvider({ warehouseTransferId, ...props }) { // Handle fetch warehouse transfer detail. const { data: warehouseTransfer, isLoading: isWarehouseTransferLoading } = useWarehouseTransfer(warehouseTransferId, { enabled: !!warehouseTransferId, }); const provider = { warehouseTransfer, warehouseTransferId, }; return ( ); } const useWarehouseDetailDrawerContext = () => React.useContext(WarehouseTransferDetailDrawerContext); export { WarehouseTransferDetailDrawerProvider, useWarehouseDetailDrawerContext, };