Commit 3868fb5b by Arjun Jhukal

updated the withdrawl history validation

parent 905d8f67
......@@ -24,7 +24,7 @@ export default function RootLayout({
return (
<html lang="en">
{/* className="dark" */}
<body className={`${inter.className} scroll-smooth dark`}>
<body className={`${inter.className} scroll-smooth dark`} cz-shortcut-listen="true">
<ProviderWrapper>
{children}
......
"use client";
import { useThemeContext } from "@/context/ThemeContext";
import { InputLabel } from "@mui/material";
import React from "react";
......@@ -32,6 +33,8 @@ export default function SelectField({
error,
touched,
}: SelectFieldProps) {
const theme = useThemeContext();
console.log("theme", theme);
return (
<div className="input__field">
<InputLabel className="block text-sm font-semibold mb-2">
......
......@@ -19,7 +19,7 @@ export default function CustomTable<TData>({ table, loading = false,
if (user?.role && user?.role.toUpperCase() !== "USER") {
return (
<table className="min-w-full border-collapse border border-gray-200 text-left">
<table className="min]-w-full border-collapse border border-gray-200 text-left">
<thead>
{table.getHeaderGroups().map((headerGroup) => (
<tr key={headerGroup.id}>
......@@ -101,8 +101,8 @@ export default function CustomTable<TData>({ table, loading = false,
Array.from({ length: skeletonRows }).map((_, rowIndex) => (
<tr key={`skeleton-${rowIndex}`} className="animate-pulse">
{Array.from({ length: columnCount }).map((_, colIndex) => (
<td key={`skeleton-cell-${rowIndex}-${colIndex}`} className="text-[14px] p-2 lg:p-4 ">
<div className="h-4 w-full rounded-xl bg-[rgba(255, 255, 255, 0.10)]" />
<td key={`skeleton-cell-${rowIndex}-${colIndex}`} className="text-[14px] p-2 lg:p-4 " >
<div className="h-4 w-full rounded-xl bg-[rgba(255, 255, 255, 0.10)]" style={{ background: "rgba(255, 255, 255, 0.10)" }} />
</td>
))}
</tr>
......
......@@ -51,6 +51,8 @@ export default function WithdrawnHistoryPage() {
}
]
console.log(data);
const table = useReactTable({
data: data?.data?.data || [],
// data: dummyDeposits,
......@@ -62,9 +64,8 @@ export default function WithdrawnHistoryPage() {
return (
<>
<CustomTable table={table} loading={isLoading} emptyMessage="You haven't deposite yet!" />
<div className="flex justify-between items-center mt-4 px-8 py-6">
<Pagination count={data?.data?.pagination.total_pages || 1}
{data && data?.data?.data.length > 5 ? <div className="flex justify-between items-center mt-4 px-8 py-6">
<Pagination count={data?.data?.pagination?.total_pages || 1}
page={page}
onChange={(_, value) => setPage(value)} variant="outlined" shape="rounded" sx={{ gap: "8px" }} />
<div>
......@@ -81,7 +82,7 @@ export default function WithdrawnHistoryPage() {
))}
</select>
</div>
</div>
</div> : ""}
</>
)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment