@accounter/client
Version:
Accounter client application
1 lines • 689 B
JavaScript
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-D5j7GDmL.js";import"./common-CXB0UgWw.js";import{il as o}from"./table-Dje35oxp.js";import{on as s,us as c}from"./graphql-BIob9ctl.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};