Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sweepstake
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arjun Jhukal
sweepstake
Commits
3868fb5b
Commit
3868fb5b
authored
Sep 25, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the withdrawl history validation
parent
905d8f67
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
+12
-8
layout.tsx
src/app/layout.tsx
+1
-1
SelectField.tsx
src/components/atom/SelectField.tsx
+3
-0
index.tsx
src/components/organism/Table/index.tsx
+3
-3
index.tsx
.../pages/dashboard/userDashboard/withdrawlHistory/index.tsx
+5
-4
No files found.
src/app/layout.tsx
View file @
3868fb5b
...
@@ -24,7 +24,7 @@ export default function RootLayout({
...
@@ -24,7 +24,7 @@ export default function RootLayout({
return
(
return
(
<
html
lang=
"en"
>
<
html
lang=
"en"
>
{
/* className="dark" */
}
{
/* className="dark" */
}
<
body
className=
{
`${inter.className} scroll-smooth dark`
}
>
<
body
className=
{
`${inter.className} scroll-smooth dark`
}
cz
-
shortcut
-
listen=
"true"
>
<
ProviderWrapper
>
<
ProviderWrapper
>
{
children
}
{
children
}
...
...
src/components/atom/SelectField.tsx
View file @
3868fb5b
"use client"
;
"use client"
;
import
{
useThemeContext
}
from
"@/context/ThemeContext"
;
import
{
InputLabel
}
from
"@mui/material"
;
import
{
InputLabel
}
from
"@mui/material"
;
import
React
from
"react"
;
import
React
from
"react"
;
...
@@ -32,6 +33,8 @@ export default function SelectField({
...
@@ -32,6 +33,8 @@ export default function SelectField({
error
,
error
,
touched
,
touched
,
}:
SelectFieldProps
)
{
}:
SelectFieldProps
)
{
const
theme
=
useThemeContext
();
console
.
log
(
"theme"
,
theme
);
return
(
return
(
<
div
className=
"input__field"
>
<
div
className=
"input__field"
>
<
InputLabel
className=
"block text-sm font-semibold mb-2"
>
<
InputLabel
className=
"block text-sm font-semibold mb-2"
>
...
...
src/components/organism/Table/index.tsx
View file @
3868fb5b
...
@@ -19,7 +19,7 @@ export default function CustomTable<TData>({ table, loading = false,
...
@@ -19,7 +19,7 @@ export default function CustomTable<TData>({ table, loading = false,
if
(
user
?.
role
&&
user
?.
role
.
toUpperCase
()
!==
"USER"
)
{
if
(
user
?.
role
&&
user
?.
role
.
toUpperCase
()
!==
"USER"
)
{
return
(
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
>
<
thead
>
{
table
.
getHeaderGroups
().
map
((
headerGroup
)
=>
(
{
table
.
getHeaderGroups
().
map
((
headerGroup
)
=>
(
<
tr
key=
{
headerGroup
.
id
}
>
<
tr
key=
{
headerGroup
.
id
}
>
...
@@ -101,8 +101,8 @@ export default function CustomTable<TData>({ table, loading = false,
...
@@ -101,8 +101,8 @@ export default function CustomTable<TData>({ table, loading = false,
Array
.
from
({
length
:
skeletonRows
}).
map
((
_
,
rowIndex
)
=>
(
Array
.
from
({
length
:
skeletonRows
}).
map
((
_
,
rowIndex
)
=>
(
<
tr
key=
{
`skeleton-${rowIndex}`
}
className=
"animate-pulse"
>
<
tr
key=
{
`skeleton-${rowIndex}`
}
className=
"animate-pulse"
>
{
Array
.
from
({
length
:
columnCount
}).
map
((
_
,
colIndex
)
=>
(
{
Array
.
from
({
length
:
columnCount
}).
map
((
_
,
colIndex
)
=>
(
<
td
key=
{
`skeleton-cell-${rowIndex}-${colIndex}`
}
className=
"text-[14px] p-2 lg:p-4 "
>
<
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)]"
/>
<
div
className=
"h-4 w-full rounded-xl bg-[rgba(255, 255, 255, 0.10)]"
style=
{
{
background
:
"rgba(255, 255, 255, 0.10)"
}
}
/>
</
td
>
</
td
>
))
}
))
}
</
tr
>
</
tr
>
...
...
src/components/pages/dashboard/userDashboard/withdrawlHistory/index.tsx
View file @
3868fb5b
...
@@ -51,6 +51,8 @@ export default function WithdrawnHistoryPage() {
...
@@ -51,6 +51,8 @@ export default function WithdrawnHistoryPage() {
}
}
]
]
console
.
log
(
data
);
const
table
=
useReactTable
({
const
table
=
useReactTable
({
data
:
data
?.
data
?.
data
||
[],
data
:
data
?.
data
?.
data
||
[],
// data: dummyDeposits,
// data: dummyDeposits,
...
@@ -62,9 +64,8 @@ export default function WithdrawnHistoryPage() {
...
@@ -62,9 +64,8 @@ export default function WithdrawnHistoryPage() {
return
(
return
(
<>
<>
<
CustomTable
table=
{
table
}
loading=
{
isLoading
}
emptyMessage=
"You haven't deposite yet!"
/>
<
CustomTable
table=
{
table
}
loading=
{
isLoading
}
emptyMessage=
"You haven't deposite yet!"
/>
<
div
className=
"flex justify-between items-center mt-4 px-8 py-6"
>
{
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
}
<
Pagination
count=
{
data
?.
data
?.
pagination
.
total_pages
||
1
}
page=
{
page
}
page=
{
page
}
onChange=
{
(
_
,
value
)
=>
setPage
(
value
)
}
variant=
"outlined"
shape=
"rounded"
sx=
{
{
gap
:
"8px"
}
}
/>
onChange=
{
(
_
,
value
)
=>
setPage
(
value
)
}
variant=
"outlined"
shape=
"rounded"
sx=
{
{
gap
:
"8px"
}
}
/>
<
div
>
<
div
>
...
@@ -81,7 +82,7 @@ export default function WithdrawnHistoryPage() {
...
@@ -81,7 +82,7 @@ export default function WithdrawnHistoryPage() {
))
}
))
}
</
select
>
</
select
>
</
div
>
</
div
>
</
div
>
</
div
>
:
""
}
</>
</>
)
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment