UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

53 lines (52 loc) 1.54 kB
import { jsxs as s, jsx as t } from "react/jsx-runtime"; import { useState as e } from "react"; import { EvaluationEditor as u } from "./EvaluationEditor.js"; import { EvaluationRoundEditorList as l } from "./EvaluationRoundEditorList.js"; import { Alert as v, Button as c } from "@mui/material"; function x({ evaluationId: a, entityId: i, onDeleteSuccess: d }) { const [o, r] = e(a); return /* @__PURE__ */ s("div", { children: [ /* @__PURE__ */ t( u, { evaluationId: o, entityId: o ? void 0 : i, onDeleteSuccess: d, onSaveSuccess: r } ), /* @__PURE__ */ t("div", { className: "my-4", children: o ? /* @__PURE__ */ t(l, { evaluationId: o }) : ( // shows an alert informing user to first create an Evaluation if they // click the "Add Round" button /* @__PURE__ */ t(n, {}) ) }) ] }); } function n() { const [a, i] = e(!1); return /* @__PURE__ */ t("div", { "data-testid": "FakeEvaluationRoundEditorList", children: a ? /* @__PURE__ */ t(v, { severity: "info", children: "Evaluation Rounds can be edited once the Evaluation has been created." }) : /* @__PURE__ */ t( c, { className: "add-round-button", variant: "contained", color: "primary", onClick: () => { i(!0); }, children: "Add Round" } ) }); } const I = { FakeEvaluationRoundEditorList: n }; export { x as EvaluationEditorPage, I as HelpersToTest, x as default }; //# sourceMappingURL=EvaluationEditorPage.js.map