synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
28 lines (27 loc) • 869 B
JavaScript
import { jsx as l } from "react/jsx-runtime";
import { getEvaluation as c } from "../../../synapse-client/SynapseClient.js";
import { useSynapseContext as f } from "../../../utils/context/SynapseContext.js";
import { useState as d, useEffect as p } from "react";
import { useInView as v } from "react-intersection-observer";
function w(a) {
const { accessToken: r } = f(), { evaluationId: e } = a, [u, i] = d(), { ref: s, inView: n } = v();
let o = !0;
p(() => (o && n && m(), () => {
o = !1;
}), [e, n]);
const m = () => {
e && c(e, r).then((t) => {
i(t.name);
}).catch((t) => {
console.log(
"EvaluationIdListRenderer: Error getting evaluation queue names",
t
);
});
};
return /* @__PURE__ */ l("p", { ref: s, children: u });
}
export {
w as default
};
//# sourceMappingURL=EvaluationIdRenderer.js.map