@accounter/client
Version:
Accounter client application
1 lines • 681 B
JavaScript
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-ZLozA1tS.js";import"./common-D-vYt_Yl.js";import{tl as o}from"./table-AJA7Uyxy.js";import{Qo as s,in as c}from"./graphql-DC5GYCFE.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};