UNPKG

@accounter/client

Version:
1 lines 681 B
import{s as e}from"./dist-ypP48_Ax.js";import{i as t,o as n}from"./utils-CbS-oR5I.js";import{m as r,y as i}from"./routes-Cawu7UJi.js";import{t as a}from"./charges-table-D15BZ53d.js";import"./common-BYzquCdh.js";import{tl as o}from"./table-C_kaQZZD.js";import{in as s,ts as c}from"./graphql-C3zf23B0.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]=c({query:s,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};