Skip to content
Snippets Groups Projects

CE-2076: Convert useHost to common

Merged CE-2076: Convert useHost to common
1 unresolved thread
Merged Alexander Madsen requested to merge CE-2076-convert-useHost into develop
1 unresolved thread
1 file
+ 8
1
Compare changes
  • Side-by-side
  • Inline
@@ -10,9 +10,16 @@ export function HostDetailsContainer({ id }) {
@@ -10,9 +10,16 @@ export function HostDetailsContainer({ id }) {
const [error, setError] = useState(null);
const [error, setError] = useState(null);
const client = useContext(apiContext);
const client = useContext(apiContext);
 
const params = useMemo(
 
() => ({
 
host_csentry_id: id
 
}),
 
[id]
 
);
 
const { value: host, error: fetchError } = useAPIMethod({
const { value: host, error: fetchError } = useAPIMethod({
fcn: client.apis.Hosts.findHostById,
fcn: client.apis.Hosts.findHostById,
params: useMemo(() => ({ host_csentry_id: id }), [id])
params
});
});
useEffect(() => {
useEffect(() => {
Loading