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

38 lines (37 loc) 1.12 kB
import { jsxs as c, jsx as e } from "react/jsx-runtime"; import { useGetSubscribers as b } from "../../synapse-queries/subscription/useSubscription.js"; import { Link as l } from "@mui/material"; import { ConfirmationDialog as m } from "../ConfirmationDialog/ConfirmationDialog.js"; import { UserBadge as a } from "../UserCard/UserBadge.js"; function g({ id: i, objectType: t, showModal: n, handleModal: s }) { const { data: r } = b({ objectId: i, objectType: t }); return /* @__PURE__ */ c("div", { className: "SubscribersModal", children: [ r && r.subscribers.length > 0 && /* @__PURE__ */ e( l, { onClick: () => s(!0), children: `Followers (${r.subscribers.length})` } ), /* @__PURE__ */ e( m, { open: n, onCancel: () => s(!1), title: "Followers", content: r && r.subscribers.map((o) => /* @__PURE__ */ e(a, { userId: o, showCardOnHover: !0 }, o)), onConfirm: () => s(!1), hasCancelButton: !1 } ) ] }); } export { g as SubscribersModal }; //# sourceMappingURL=SubscribersModal.js.map