Skip to content
Snippets Groups Projects

CE-2076: Convert useHost to common

Merged Alexander Madsen requested to merge CE-2076-convert-useHost into develop
3 files
+ 26
13
Compare changes
  • Side-by-side
  • Inline
Files
3
import React from "react";
import React, { useContext, useMemo } from "react";
import { Container } from "@mui/material";
import { Container } from "@mui/material";
import { useHost } from "../../../api/SwaggerApi";
import { LokiPanel } from "./LokiPanel";
import { LokiPanel } from "./LokiPanel";
 
import { apiContext } from "../../../api/DeployApi";
 
import { useAPIMethod } from "@ess-ics/ce-ui-common";
export function LokiContainer({ csEntryId, iocName, isDeployed }) {
export function LokiContainer({ csEntryId, iocName, isDeployed }) {
const [iocHost] = useHost(csEntryId);
const client = useContext(apiContext);
 
 
const { value: iocHost } = useAPIMethod({
 
fcn: client.apis.Hosts.findHostById,
 
params: useMemo(() => ({ host_csentry_id: csEntryId }), [csEntryId])
 
});
return (
return (
<>
<>
Loading