Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 64056bb2a4 | |||
| e49c4d66f8 |
@@ -50,7 +50,7 @@ function RewardsTable() {
|
|||||||
<div className='flex flex-col justify-between min-h-[500px]'>
|
<div className='flex flex-col justify-between min-h-[500px]'>
|
||||||
{familyRewardHistory.loading ?
|
{familyRewardHistory.loading ?
|
||||||
<LoadingSpinner size='16' color='sky-blue' height='h-[500px]' />
|
<LoadingSpinner size='16' color='sky-blue' height='h-[500px]' />
|
||||||
:
|
: familyRewardHistory.data.length ?
|
||||||
<table className="wallet-activity w-full table-auto border-collapse text-left">
|
<table className="wallet-activity w-full table-auto border-collapse text-left">
|
||||||
<thead className='border-b-2'>
|
<thead className='border-b-2'>
|
||||||
<tr className='text-slate-600'>
|
<tr className='text-slate-600'>
|
||||||
@@ -60,8 +60,6 @@ function RewardsTable() {
|
|||||||
<th className="p-2">Confirmation</th>
|
<th className="p-2">Confirmation</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{familyRewardHistory.data.length ?
|
|
||||||
(
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{currentReward.map((item, index) => {
|
{currentReward.map((item, index) => {
|
||||||
let date = new Date(item.added).toLocaleDateString()
|
let date = new Date(item.added).toLocaleDateString()
|
||||||
@@ -84,24 +82,15 @@ function RewardsTable() {
|
|||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
</tbody>
|
</tbody>
|
||||||
)
|
|
||||||
:
|
|
||||||
familyRewardHistory.error ?
|
|
||||||
(
|
|
||||||
<tbody>
|
|
||||||
<tr className='text-slate-500'>
|
|
||||||
<td className="p-2" colSpan={4}>Opps! an error occurred. Please try again!</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
)
|
|
||||||
:
|
|
||||||
<tbody>
|
|
||||||
<tr className='text-slate-500'>
|
|
||||||
<td className="p-2" colSpan={4}>No Rewards History Found!</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
}
|
|
||||||
</table>
|
</table>
|
||||||
|
:familyRewardHistory.error ?
|
||||||
|
<div className="p-2 text-slate-500 flex flex-col grow justify-center items-center">
|
||||||
|
<span>Opps! an error occurred. Please try again!</span>
|
||||||
|
</div>
|
||||||
|
:
|
||||||
|
<div className="p-2 text-slate-500 flex flex-col grow justify-center items-center">
|
||||||
|
<span>No Rewards History Found!</span>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
{/* PAGINATION BUTTON */}
|
{/* PAGINATION BUTTON */}
|
||||||
|
|||||||
@@ -255,9 +255,9 @@ export default function History() {
|
|||||||
{/* PURCHASE SECTION */}
|
{/* PURCHASE SECTION */}
|
||||||
{tab == 'purchases' &&
|
{tab == 'purchases' &&
|
||||||
<div className="wallet w-full border-t">
|
<div className="wallet w-full border-t">
|
||||||
<h1 className="p-2 text-xl font-bold text-dark-gray dark:text-white tracking-wide">Purchases</h1>
|
{/* <h1 className="p-2 text-xl font-bold text-dark-gray dark:text-white tracking-wide">Purchases</h1> */}
|
||||||
{purchaseHistory.loading ?
|
{purchaseHistory.loading ?
|
||||||
<LoadingSpinner size='16' color='sky-blue' />
|
<LoadingSpinner size='16' color='sky-blue' height='h-[500px]' />
|
||||||
:
|
:
|
||||||
<PurchasesTable purchase={purchaseHistory} />
|
<PurchasesTable purchase={purchaseHistory} />
|
||||||
}
|
}
|
||||||
@@ -268,10 +268,10 @@ export default function History() {
|
|||||||
{/* RECENT ACTIVITY SECTION */}
|
{/* RECENT ACTIVITY SECTION */}
|
||||||
{tab == 'recent' &&
|
{tab == 'recent' &&
|
||||||
<div className="wallet w-full border-t">
|
<div className="wallet w-full border-t">
|
||||||
<h1 className="p-2 text-xl font-bold text-dark-gray dark:text-white tracking-wide">Recent Activity</h1>
|
{/* <h1 className="p-2 text-xl font-bold text-dark-gray dark:text-white tracking-wide">Recent Activity</h1> */}
|
||||||
{/* <p className='text-base text-slate-500 dark:text-white'>Activity Report</p> */}
|
{/* <p className='text-base text-slate-500 dark:text-white'>Activity Report</p> */}
|
||||||
{paymentHistory.loading ?
|
{paymentHistory.loading ?
|
||||||
<LoadingSpinner size='16' color='sky-blue' />
|
<LoadingSpinner size='16' color='sky-blue' height='h-[500px]' />
|
||||||
:
|
:
|
||||||
<RecentActivityTable payment={paymentHistory} />
|
<RecentActivityTable payment={paymentHistory} />
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ function PurchasesTable({purchase}) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-col justify-between min-h-[500px]'>
|
<div className='flex flex-col justify-between min-h-[500px]'>
|
||||||
|
{purchase.data.length ?
|
||||||
<table className="wallet-activity w-full table-auto border-collapse text-left">
|
<table className="wallet-activity w-full table-auto border-collapse text-left">
|
||||||
<thead className='border-b-2'>
|
<thead className='border-b-2'>
|
||||||
<tr className='text-slate-600'>
|
<tr className='text-slate-600'>
|
||||||
@@ -24,8 +25,6 @@ function PurchasesTable({purchase}) {
|
|||||||
<th className="p-2">Fee</th>
|
<th className="p-2">Fee</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{purchase.data.length ?
|
|
||||||
(
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{currentPurchase.map((item, index) => (
|
{currentPurchase.map((item, index) => (
|
||||||
<tr key={index} className='text-slate-500'>
|
<tr key={index} className='text-slate-500'>
|
||||||
@@ -37,24 +36,16 @@ function PurchasesTable({purchase}) {
|
|||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
)
|
|
||||||
:
|
|
||||||
purchase.error ?
|
|
||||||
(
|
|
||||||
<tbody>
|
|
||||||
<tr className='text-slate-500'>
|
|
||||||
<td className="p-2" colSpan={4}>Opps! an error occurred. Please try again!</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
)
|
|
||||||
:
|
|
||||||
<tbody>
|
|
||||||
<tr className='text-slate-500'>
|
|
||||||
<td className="p-2" colSpan={4}>No Purchase History Found!</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
}
|
|
||||||
</table>
|
</table>
|
||||||
|
:purchase.error ?
|
||||||
|
<div className="p-2 text-slate-500 flex flex-col grow justify-center items-center">
|
||||||
|
<span>Opps! an error occurred. Please try again!</span>
|
||||||
|
</div>
|
||||||
|
:
|
||||||
|
<div className="p-2 text-slate-500 flex flex-col grow justify-center items-center">
|
||||||
|
<span>No Purchase History Found!</span>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
{/* PAGINATION BUTTON */}
|
{/* PAGINATION BUTTON */}
|
||||||
<PaginatedList onClick={handlePagination} prev={currentPage == 0 ? true : false} next={currentPage+Number(process.env.REACT_APP_ITEM_PER_PAGE) >= purchase?.data?.length ? true : false} data={purchase?.data} start={indexOfFirstItem} stop={indexOfLastItem} />
|
<PaginatedList onClick={handlePagination} prev={currentPage == 0 ? true : false} next={currentPage+Number(process.env.REACT_APP_ITEM_PER_PAGE) >= purchase?.data?.length ? true : false} data={purchase?.data} start={indexOfFirstItem} stop={indexOfLastItem} />
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ function RecentActivityTable({ payment }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col justify-between min-h-[500px]">
|
<div className="flex flex-col justify-between min-h-[500px]">
|
||||||
|
{payment?.data?.length > 0 ?
|
||||||
<table className="wallet-activity w-full table-auto border-collapse text-left">
|
<table className="wallet-activity w-full table-auto border-collapse text-left">
|
||||||
<thead className="border-b-2">
|
<thead className="border-b-2">
|
||||||
<tr className="text-slate-600">
|
<tr className="text-slate-600">
|
||||||
@@ -28,7 +29,6 @@ function RecentActivityTable({ payment }) {
|
|||||||
<th className="p-2">Status</th>
|
<th className="p-2">Status</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{payment?.data?.length > 0 ? (
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{currentActivity.map((item, index) => (
|
{currentActivity.map((item, index) => (
|
||||||
<tr key={index} className="text-slate-500">
|
<tr key={index} className="text-slate-500">
|
||||||
@@ -46,24 +46,16 @@ function RecentActivityTable({ payment }) {
|
|||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
) : payment?.error ? (
|
|
||||||
<tbody>
|
|
||||||
<tr className="text-slate-500">
|
|
||||||
<td className="p-2" colSpan={4}>
|
|
||||||
Opps! an error occurred. Please try again!
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
) : (
|
|
||||||
<tbody>
|
|
||||||
<tr className="text-slate-500">
|
|
||||||
<td className="p-2" colSpan={4}>
|
|
||||||
No Payment History Found!
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
)}
|
|
||||||
</table>
|
</table>
|
||||||
|
:payment.error ?
|
||||||
|
<div className="p-2 text-slate-500 flex flex-col grow justify-center items-center">
|
||||||
|
<span>Opps! an error occurred. Please try again!</span>
|
||||||
|
</div>
|
||||||
|
:
|
||||||
|
<div className="p-2 text-slate-500 flex flex-col grow justify-center items-center">
|
||||||
|
<span>No Payment History Found!</span>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
{/* PAGINATION BUTTON */}
|
{/* PAGINATION BUTTON */}
|
||||||
<PaginatedList
|
<PaginatedList
|
||||||
|
|||||||
Reference in New Issue
Block a user