CE-2076: Convert useHost to common
1 unresolved thread
1 unresolved thread
Ticket: CE-2076
Convert useHost hook to common and remove from SwaggerApi file
Merge request reports
Activity
Filter activity
requested review from @christinajenks, @domonkosgulyas, and @imretoth
assigned to @alexandermadsen
5 4 import { onFetchEntityError } from "../../components/common/Helper"; 6 5 import NotFoundView from "../../components/navigation/NotFoundView/NotFoundView"; 6 import { apiContext } from "../../api/DeployApi"; 7 import { useAPIMethod } from "@ess-ics/ce-ui-common"; 7 8 8 9 export function HostDetailsContainer({ id }) { 9 const [notFoundError, setNotFoundError] = useState(); 10 const [host] = useHost(id, (m, s) => { 11 // handle error code 404, and define custom message on the UI because BE sends back generic error message 12 onFetchEntityError(m, s, setNotFoundError); 10 const [error, setError] = useState(null); 11 const client = useContext(apiContext); 12 13 const { value: host, error: fetchError } = useAPIMethod({ 14 fcn: client.apis.Hosts.findHostById, 15 params: useMemo(() => ({ host_csentry_id: id }), [id]) changed this line in version 4 of the diff
added 7 commits
-
25fa0b62...d7d3d5a9 - 6 commits from branch
develop
- 6f9dc8e4 - Convert useHost hook to common and remove from SwaggerApi file
-
25fa0b62...d7d3d5a9 - 6 commits from branch
mentioned in commit 374b4101
Please register or sign in to reply