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

43 lines (42 loc) 1.23 kB
import { jsx as o, Fragment as l, jsxs as i } from "react/jsx-runtime"; import { useGetDOI as m } from "../../synapse-queries/doi/useDOI.js"; import { Box as a, Typography as n } from "@mui/material"; function y(p) { const { id: t, version: d, type: s, portalId: c } = p, { data: r } = m( { id: t, version: d, type: s, portalId: c }, { enabled: !!t } ); return r ? /* @__PURE__ */ i( a, { sx: { backgroundColor: "tertiary.100", borderRadius: "3px", p: "20px", display: "flex", flexDirection: "column", gap: "20px" }, children: [ /* @__PURE__ */ o(n, { variant: "body1", sx: { fontWeight: 700 }, children: "Requested resource" }), /* @__PURE__ */ o(a, { children: /* @__PURE__ */ i(n, { variant: "body1", children: [ r.creators?.map((e) => e.creatorName).join(", & "), " ", "(", r.publicationYear, ").", " ", r.titles?.map((e) => `${e.title}.`), " Synapse. https://doi.org/", r.doiUri ] }) }) ] } ) : /* @__PURE__ */ o(l, {}); } export { y as default }; //# sourceMappingURL=SynapseObjectDOIInfo.js.map