diff --git a/frontend/src/pages/Transactions.jsx b/frontend/src/pages/Transactions.jsx index 0f85b6e..8f43ac2 100644 --- a/frontend/src/pages/Transactions.jsx +++ b/frontend/src/pages/Transactions.jsx @@ -1,113 +1,18 @@ -// import { useState } from "react"; -// import { Link } from "react-router-dom"; - -// const Transactions = () => { -// return
; -// }; - -// export default Transactions; - - -// import { useState, useEffect } from "react"; - -// const Transactions = () => { -// const [transactions, setTransactions] = useState([]); -// const [isLoading, setIsLoading] = useState(true); -// const [error, setError] = useState(null); - -// useEffect(() => { -// const fetchTransactions = async () => { -// try { -// setIsLoading(true); -// setError(null); - -// const response = await fetch( -// "http://localhost:3030/api/transaction/getAllTransactions" -// ); -// const result = await response.json(); - -// if (!response.ok) { -// throw new Error(result.error || "Failed to fetch transactions"); -// } - -// setTransactions(result.transactions); -// } catch (err) { -// setError(err.message); -// } finally { -// setIsLoading(false); -// } -// }; - -// fetchTransactions(); -// }, []); - -// if (isLoading) { -// returnNo transactions found.
-// ) : ( -//| Transaction ID | -//User ID | -//Product ID | -//Date | -//Payment Status | -//
|---|---|---|---|---|
| {tx.TransactionID} | -//{tx.UserID} | -//{tx.ProductID} | -//-// {new Date(tx.Date).toLocaleString()} -// | -//{tx.PaymentStatus} | -//
- Once you make a purchase, your transactions will appear here. + Once transactions are created, they’ll appear here.
{- ${tx.price.toFixed(2)} -
- )} -- Status: {tx.status} -
-+ ${tx.price.toFixed(2)} +
+ )} ++ Status: {tx.status} +
+