UNPKG

@accounter/client

Version:
1 lines 689 B
import{s as e}from"./dist-ypP48_Ax.js";import{i as t,o as n}from"./utils-CbS-oR5I.js";import{c as r,p as i}from"./chunk-62JRHF6Z-CBbOZODe.js";import{t as a}from"./charges-table-DSlkZayz.js";import"./common-DtCH-1rN.js";import{il as o}from"./table-BXolY871.js";import{ls as s,on as c}from"./graphql-HKLcNTdf.js";var l=e(n(),1),u=t(),d=({chargeId:e})=>{let{chargeId:t}=i(),n=e||t,d;try{d=r()}catch{}let[{data:f,fetching:p},m]=s({query:c,pause:!n||!!d,variables:{chargeId:n??``}});(0,l.useEffect)(()=>{n&&!d&&m()},[n,d,m]);let h=d||f;return n?!d&&p?(0,u.jsx)(o,{}):(0,u.jsx)(a,{data:h?.charge?[h.charge]:[],isAllOpened:!0}):(0,u.jsx)(`div`,{children:`Charge not found`})};export{d as Charge};