@accounter/client
Version:
Accounter client application
1 lines • 687 B
JavaScript
import{s as e}from"./dist-BbgEzppd.js";import{i as t,o as n}from"./utils-BUNz070n.js";import{Jt as r,Ya as i}from"./error-handling-AQOG1RNy.js";import{g as a,x as o}from"./routes-BXbESQBe.js";import{t as s}from"./charges-table-CIcrjmB2.js";import"./common-Cy-x5Vhe.js";import{b as c}from"./table-tK8pMUMS.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};