UNPKG

@accounter/client

Version:
1 lines 687 B
import{s as e}from"./dist-BBBZL-zT.js";import{i as t,o as n}from"./utils-C9b7NsUD.js";import{$t as r,So as i}from"./error-handling-DIXN-FX1.js";import{m as a,y as o}from"./routes-g2AjKuLo.js";import{t as s}from"./charges-table-Dy8Tb2Q4.js";import"./common-DiZ9CVmc.js";import{b as c}from"./table-x-G-XYlj.js";var l=e(n(),1),u=t(),d=({chargeId:e})=>{let{chargeId:t}=o(),n=e||t,d;try{d=a()}catch{}let[{data:f,fetching:p},m]=i({query:r,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)(c,{}):(0,u.jsx)(s,{data:h?.charge?[h.charge]:[],isAllOpened:!0}):(0,u.jsx)(`div`,{children:`Charge not found`})};export{d as Charge};