[fixed] - view io details
This commit is contained in:
@@ -37,7 +37,7 @@ import EditIO from "../EditIO/EditIO";
|
||||
import IOArtifacts from "../CreateIO/IOArtifacts";
|
||||
// import IOCashDetails from "../CreateIO/IOCashDetailsold";
|
||||
// import IONAVDetails from "../CreateIO/IONAVDetailsOld";
|
||||
import { useGetIOprepopulateDataQuery } from "../../../Services/io.service";
|
||||
import { useGetIOByIdQuery, useGetIOprepopulateDataQuery } from "../../../Services/io.service";
|
||||
import UnderConstruction from "../../UnderConstruction";
|
||||
import Destribution from "../CreateIO/Destribution";
|
||||
import IOCashDetails from "../CreateIO/IOCashDetails/IOCashDetails";
|
||||
@@ -58,6 +58,12 @@ const ViewIOdata = () => {
|
||||
const params = useParams();
|
||||
const id = params?.id;
|
||||
const { data, error, isLoading, refetch } = useGetIOprepopulateDataQuery();
|
||||
const {
|
||||
data: IObyID,
|
||||
isLoading: IObyIDisLoading,
|
||||
error: IObyIDerror,
|
||||
refetch: IObyIDrefetch,
|
||||
} = useGetIOByIdQuery(id, { skip: !id });
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
const navigate = useNavigate();
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
@@ -91,7 +97,7 @@ const ViewIOdata = () => {
|
||||
const handleRefresh = async () => {
|
||||
setIsRefetchLoading(true);
|
||||
|
||||
await refetch();
|
||||
await IObyIDrefetch();
|
||||
setIsRefetchLoading(false);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user