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

39 lines (38 loc) 1.39 kB
import { jsx as o, jsxs as r, Fragment as g } from "react/jsx-runtime"; import { Typography as c, Divider as d } from "@mui/material"; import { Marker as f, InfoWindow as h } from "@react-google-maps/api"; import { useMemo as a, Fragment as w } from "react"; import { UserBadge as u } from "../UserCard/UserBadge.js"; const k = "https://s3.amazonaws.com/static.synapse.org/images/synapse-map-marker.png"; function b(s) { const { geoData: n, showInfoWindow: i, onClick: t, onInfoWindowCloseClick: m } = s, p = a( () => ({ lat: n.latLng[0], lng: n.latLng[1] }), [n.latLng] ), l = a( () => ({ icon: { url: k, size: new google.maps.Size(20, 32), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(0, 32) } }), [] ); return /* @__PURE__ */ o(f, { onClick: t, position: p, options: l, children: i && /* @__PURE__ */ o(h, { onCloseClick: m, children: /* @__PURE__ */ r(g, { children: [ /* @__PURE__ */ o(c, { variant: "body1", component: "span", children: n.location }), /* @__PURE__ */ o(d, {}), n.userIds.map((e) => /* @__PURE__ */ r(w, { children: [ /* @__PURE__ */ o("br", {}), /* @__PURE__ */ o(u, { userId: e, openLinkInNewTab: !0 }) ] }, e)) ] }) }) }); } export { b as SynapseUserMarker, b as default }; //# sourceMappingURL=SynapseUserMarker.js.map