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
49368af2
Commit
49368af2
authored
Oct 31, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the kyc form and verify kyc ui
parent
1ca7fa6c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
275 additions
and
10 deletions
+275
-10
page.tsx
src/app/(dashboard)/(user)/(outsideAuth)/page.tsx
+3
-0
page.tsx
src/app/(dashboard)/(user)/(outsideAuth)/verify-kyc/page.tsx
+12
-0
index.tsx
src/components/pages/auth/register/index.tsx
+10
-10
KycBanner.tsx
...nts/pages/dashboard/userDashboard/verifyKyc/KycBanner.tsx
+21
-0
index.tsx
...ponents/pages/dashboard/userDashboard/verifyKyc/index.tsx
+229
-0
No files found.
src/app/(dashboard)/(user)/(outsideAuth)/page.tsx
View file @
49368af2
...
@@ -7,6 +7,8 @@ import Image from "next/image";
...
@@ -7,6 +7,8 @@ import Image from "next/image";
import
Link
from
"next/link"
;
import
Link
from
"next/link"
;
import
DashboardProvider
from
"./DashboardProvider"
;
import
DashboardProvider
from
"./DashboardProvider"
;
import
GlassWrapper
from
"@/components/molecules/GlassWrapper"
;
import
GlassWrapper
from
"@/components/molecules/GlassWrapper"
;
import
{
Stack
}
from
"@mui/material"
;
import
KycBanner
from
"@/components/pages/dashboard/userDashboard/verifyKyc/KycBanner"
;
export
const
dynamic
=
"force-dynamic"
;
export
const
dynamic
=
"force-dynamic"
;
...
@@ -61,6 +63,7 @@ export default async function Home() {
...
@@ -61,6 +63,7 @@ export default async function Home() {
return
(
return
(
<
DashboardProvider
>
<
DashboardProvider
>
<>
<>
{
/* <KycBanner /> */
}
{
/* Banners */
}
{
/* Banners */
}
{
bannersError
?
(
{
bannersError
?
(
<
p
className=
"text-red-500"
>
{
bannersError
}
</
p
>
<
p
className=
"text-red-500"
>
{
bannersError
}
</
p
>
...
...
src/app/(dashboard)/(user)/(outsideAuth)/verify-kyc/page.tsx
0 → 100644
View file @
49368af2
import
PageHeader
from
'@/components/molecules/PageHeader'
import
VerifyKYCPage
from
'@/components/pages/dashboard/userDashboard/verifyKyc'
import
React
from
'react'
export
default
function
VerfiyKYC
()
{
return
(
<>
<
PageHeader
title=
'Verify KYC'
/>
<
VerifyKYCPage
/>
</>
)
}
src/components/pages/auth/register/index.tsx
View file @
49368af2
...
@@ -69,8 +69,8 @@ const validationSchema = Yup.object().shape({
...
@@ -69,8 +69,8 @@ const validationSchema = Yup.object().shape({
.
max
(
14
,
"Display Name must be less than 14 characters"
)
.
max
(
14
,
"Display Name must be less than 14 characters"
)
.
min
(
6
,
"Display Name must be at least 6 characters long"
)
.
min
(
6
,
"Display Name must be at least 6 characters long"
)
.
matches
(
/^
\S
+$/
,
"Display Name cannot contain spaces"
),
.
matches
(
/^
\S
+$/
,
"Display Name cannot contain spaces"
),
phone
:
Yup
.
string
()
//
phone: Yup.string()
.
required
(
"Phone number is required"
),
//
.required("Phone number is required"),
password
:
Yup
.
string
()
password
:
Yup
.
string
()
.
required
(
'Password is required'
)
.
required
(
'Password is required'
)
.
test
(
.
test
(
...
@@ -82,14 +82,14 @@ const validationSchema = Yup.object().shape({
...
@@ -82,14 +82,14 @@ const validationSchema = Yup.object().shape({
confirmPassword
:
Yup
.
string
()
confirmPassword
:
Yup
.
string
()
.
oneOf
([
Yup
.
ref
(
'password'
)],
'Passwords must match'
)
.
oneOf
([
Yup
.
ref
(
'password'
)],
'Passwords must match'
)
.
required
(
'Confirm Password is required'
),
.
required
(
'Confirm Password is required'
),
dob
:
Yup
.
date
()
//
dob: Yup.date()
.
required
(
"Date of birth is required"
)
//
.required("Date of birth is required")
.
max
(
new
Date
(),
'Date of birth cannot be in the future'
)
//
.max(new Date(), 'Date of birth cannot be in the future')
.
test
(
'age'
,
'You must be at least 18 years old'
,
function
(
value
)
{
//
.test('age', 'You must be at least 18 years old', function (value) {
if
(
!
value
)
return
true
;
//
if (!value) return true;
const
cutoff
=
dayjs
().
subtract
(
18
,
'years'
);
//
const cutoff = dayjs().subtract(18, 'years');
return
dayjs
(
value
).
isBefore
(
cutoff
);
//
return dayjs(value).isBefore(cutoff);
})
//
})
})
})
export
default
function
RegisterPage
()
{
export
default
function
RegisterPage
()
{
...
...
src/components/pages/dashboard/userDashboard/verifyKyc/KycBanner.tsx
0 → 100644
View file @
49368af2
'use client'
;
import
GlassWrapper
from
"@/components/molecules/GlassWrapper"
;
import
{
Box
,
Button
,
Stack
,
Typography
}
from
"@mui/material"
;
import
Link
from
"next/link"
;
export
default
function
KycBanner
()
{
return
(
<
GlassWrapper
className=
"max-w-fit ml-auto"
>
<
div
className=
"flex justify-end items-center gap-8 py-2 px-3"
>
<
Typography
className=
"!text-[14px]"
>
Your KYC is not verified yet. Please verify.
</
Typography
>
<
Link
href=
"/verify-kyc"
passHref
className=
"ss-btn bg-primary-grad max-w-fit !text-[12px] !py-3 !px-4"
>
Verify KYC
</
Link
>
</
div
>
</
GlassWrapper
>
);
}
src/components/pages/dashboard/userDashboard/verifyKyc/index.tsx
0 → 100644
View file @
49368af2
'use client'
;
import
React
from
'react'
;
import
{
useFormik
}
from
'formik'
;
import
*
as
Yup
from
'yup'
;
import
dayjs
from
'dayjs'
;
import
{
LocalizationProvider
,
DatePicker
}
from
'@mui/x-date-pickers'
;
import
{
AdapterDayjs
}
from
'@mui/x-date-pickers/AdapterDayjs'
;
import
{
InputLabel
,
OutlinedInput
,
Stack
,
Button
,
TextField
}
from
'@mui/material'
;
// Reuse your MUI styles
const
formFieldSx
=
{
'& .MuiOutlinedInput-root, & .MuiPickersInputBase-root, & .MuiPickersOutlinedInput-root'
:
{
borderRadius
:
'27px'
,
background
:
'rgba(118, 107, 120, 0.55)'
,
color
:
'#fff'
,
'& .MuiOutlinedInput-notchedOutline, & .MuiPickersOutlinedInput-notchedOutline'
:
{
border
:
'0.576px solid rgba(255, 255, 255, 0.04)'
,
},
'&:hover .MuiOutlinedInput-notchedOutline, &:hover .MuiPickersOutlinedInput-notchedOutline'
:
{
borderColor
:
'rgba(255,255,255,0.2)'
,
},
'&.Mui-focused .MuiOutlinedInput-notchedOutline, &.Mui-focused .MuiPickersOutlinedInput-notchedOutline'
:
{
borderColor
:
'#B801C0'
,
},
},
'& .MuiOutlinedInput-input, & .MuiPickersInputBase-input'
:
{
padding
:
'12px 16px'
,
color
:
'#fff'
,
'&::placeholder'
:
{
color
:
'rgba(255, 255, 255, 0.2)'
,
fontWeight
:
300
,
fontSize
:
'12px'
,
opacity
:
1
,
},
},
'& .MuiInputAdornment-root'
:
{
marginRight
:
'8px'
,
},
'& .MuiInputAdornment-root button'
:
{
color
:
'rgba(255, 255, 255, 0.7)'
,
'&:hover'
:
{
color
:
'#fff'
,
background
:
'rgba(255, 255, 255, 0.08)'
,
},
},
'& .MuiIconButton-root'
:
{
padding
:
'8px'
,
},
};
// Yup validation schema
const
validationSchema
=
Yup
.
object
({
first_name
:
Yup
.
string
().
required
(
'First name is required'
),
middle_name
:
Yup
.
string
(),
last_name
:
Yup
.
string
().
required
(
'Last name is required'
),
phone
:
Yup
.
string
().
required
(
'Phone number is required'
),
dob
:
Yup
.
date
().
max
(
new
Date
(),
'Date of birth cannot be in the future'
).
required
(
'DOB is required'
),
address
:
Yup
.
string
(),
user_id
:
Yup
.
string
().
required
(
'User ID is required'
),
photo_id
:
Yup
.
string
().
required
(
'Photo ID is required'
),
});
export
default
function
VerifyKYCPage
()
{
const
formik
=
useFormik
({
initialValues
:
{
first_name
:
''
,
middle_name
:
''
,
last_name
:
''
,
phone
:
''
,
dob
:
null
,
address
:
''
,
user_id
:
''
,
photo_id
:
''
,
},
validationSchema
,
onSubmit
:
(
values
)
=>
{
console
.
log
(
'Form submitted:'
,
values
);
},
});
return
(
<
form
onSubmit=
{
formik
.
handleSubmit
}
>
<
div
className=
"grid md:grid-cols-2 gap-x-3 gap-y-5"
>
{
/* Phone */
}
<
div
className=
"col-span-2"
>
<
InputLabel
htmlFor=
"phone"
>
Phone
</
InputLabel
>
<
OutlinedInput
fullWidth
id=
"phone"
name=
"phone"
placeholder=
"Enter phone number"
value=
{
formik
.
values
.
phone
}
onChange=
{
formik
.
handleChange
}
onBlur=
{
formik
.
handleBlur
}
sx=
{
formFieldSx
}
/>
<
span
className=
"error"
>
{
formik
.
touched
.
phone
&&
formik
.
errors
.
phone
?
formik
.
errors
.
phone
:
""
}
</
span
>
</
div
>
{
/* DOB */
}
<
div
className=
"col-span-2"
>
<
InputLabel
htmlFor=
"dob"
>
Date of Birth
</
InputLabel
>
<
LocalizationProvider
dateAdapter=
{
AdapterDayjs
}
>
<
DatePicker
value=
{
formik
.
values
.
dob
}
onChange=
{
(
newValue
)
=>
formik
.
setFieldValue
(
'dob'
,
newValue
)
}
onClose=
{
()
=>
formik
.
setFieldTouched
(
'dob'
,
true
)
}
maxDate=
{
dayjs
()
}
slotProps=
{
{
textField
:
{
fullWidth
:
true
,
id
:
'dob'
,
name
:
'dob'
,
placeholder
:
'MM/DD/YYYY'
,
error
:
Boolean
(
formik
.
touched
.
dob
&&
formik
.
errors
.
dob
),
helperText
:
formik
.
touched
.
dob
&&
formik
.
errors
.
dob
,
sx
:
formFieldSx
,
},
}
}
/>
</
LocalizationProvider
>
</
div
>
{
/* First Name */
}
<
div
className=
"input__field"
>
<
InputLabel
htmlFor=
"first_name"
>
First Name
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
<
OutlinedInput
fullWidth
id=
"first_name"
name=
"first_name"
placeholder=
"Enter first name"
value=
{
formik
.
values
.
first_name
}
onChange=
{
formik
.
handleChange
}
onBlur=
{
formik
.
handleBlur
}
sx=
{
formFieldSx
}
/>
<
span
className=
"error"
>
{
formik
.
touched
.
first_name
&&
formik
.
errors
.
first_name
}
</
span
>
</
div
>
{
/* Middle Name */
}
<
div
className=
"input__field"
>
<
InputLabel
htmlFor=
"middle_name"
>
Middle Name
</
InputLabel
>
<
OutlinedInput
fullWidth
id=
"middle_name"
name=
"middle_name"
placeholder=
"Enter middle name"
value=
{
formik
.
values
.
middle_name
}
onChange=
{
formik
.
handleChange
}
onBlur=
{
formik
.
handleBlur
}
sx=
{
formFieldSx
}
/>
<
span
className=
"error"
>
{
formik
.
touched
.
middle_name
&&
formik
.
errors
.
middle_name
}
</
span
>
</
div
>
{
/* Last Name */
}
<
div
className=
"input__field"
>
<
InputLabel
htmlFor=
"last_name"
>
Last Name
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
<
OutlinedInput
fullWidth
id=
"last_name"
name=
"last_name"
placeholder=
"Enter last name"
value=
{
formik
.
values
.
last_name
}
onChange=
{
formik
.
handleChange
}
onBlur=
{
formik
.
handleBlur
}
sx=
{
formFieldSx
}
/>
<
span
className=
"error"
>
{
formik
.
touched
.
last_name
&&
formik
.
errors
.
last_name
}
</
span
>
</
div
>
{
/* Address */
}
<
div
className=
"input__field"
>
<
InputLabel
htmlFor=
"address"
>
Address
</
InputLabel
>
<
OutlinedInput
fullWidth
id=
"address"
name=
"address"
placeholder=
"Enter address"
value=
{
formik
.
values
.
address
}
onChange=
{
formik
.
handleChange
}
onBlur=
{
formik
.
handleBlur
}
sx=
{
formFieldSx
}
/>
<
span
className=
"error"
>
{
formik
.
touched
.
address
&&
formik
.
errors
.
address
}
</
span
>
</
div
>
{
/* User ID */
}
<
div
className=
"input__field"
>
<
InputLabel
htmlFor=
"user_id"
>
User ID
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
<
OutlinedInput
fullWidth
id=
"user_id"
name=
"user_id"
placeholder=
"Enter your user ID"
value=
{
formik
.
values
.
user_id
}
onChange=
{
formik
.
handleChange
}
onBlur=
{
formik
.
handleBlur
}
sx=
{
formFieldSx
}
/>
<
span
className=
"error"
>
{
formik
.
touched
.
user_id
&&
formik
.
errors
.
user_id
}
</
span
>
</
div
>
{
/* Photo ID */
}
<
div
className=
"input__field"
>
<
InputLabel
htmlFor=
"photo_id"
>
Photo ID
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
<
OutlinedInput
fullWidth
id=
"photo_id"
name=
"photo_id"
placeholder=
"Enter photo ID"
value=
{
formik
.
values
.
photo_id
}
onChange=
{
formik
.
handleChange
}
onBlur=
{
formik
.
handleBlur
}
sx=
{
formFieldSx
}
/>
<
span
className=
"error"
>
{
formik
.
touched
.
photo_id
&&
formik
.
errors
.
photo_id
}
</
span
>
</
div
>
</
div
>
<
Stack
mt=
{
4
}
direction=
"row"
justifyContent=
"flex-end"
>
<
Button
type=
"submit"
variant=
'contained'
>
Submit
</
Button
>
</
Stack
>
</
form
>
);
}
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