MCPcopy Create free account
hub / github.com/sqlchat/sqlchat / refreshPaymentList

Function refreshPaymentList

src/components/PaymentHistoryTable.tsx:13–24  ·  view source on GitHub ↗
(userId: string)

Source from the content-addressed store, hash-verified

11
12 useEffect(() => {
13 const refreshPaymentList = async (userId: string) => {
14 let list: Payment[] = [];
15 try {
16 const { data } = await axios.get("/api/payment", {
17 headers: { Authorization: `Bearer ${userId}` },
18 });
19 list = data;
20 } catch (error) {
21 // do nth
22 }
23 setList(list);
24 };
25
26 if (session?.user.id) {
27 refreshPaymentList(session.user.id);

Callers 1

PaymentHistoryTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected