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
7214ba54
Commit
7214ba54
authored
Jan 21, 2026
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the propell ads conversion
parent
450fd9f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
21 deletions
+27
-21
layout.tsx
src/app/(dashboard)/(user)/(outsideAuth)/layout.tsx
+11
-3
index.tsx
src/components/pages/auth/register/index.tsx
+6
-2
authApi.ts
src/services/authApi.ts
+8
-16
auth.ts
src/types/auth.ts
+2
-0
No files found.
src/app/(dashboard)/(user)/(outsideAuth)/layout.tsx
View file @
7214ba54
import
DashboardLayout
from
'@/components/layouts/DashboardLayout'
"use client"
;
import
AgeVerificationModal
from
'@/components/organism/dialog'
import
React
from
'react'
import
DashboardLayout
from
'@/components/layouts/DashboardLayout'
;
import
AgeVerificationModal
from
'@/components/organism/dialog'
;
import
{
useSearchParams
}
from
'next/navigation'
;
import
React
from
'react'
;
export
default
function
DashboardRootLayout
({
children
}:
{
children
:
React
.
ReactNode
})
{
export
default
function
DashboardRootLayout
({
children
}:
{
children
:
React
.
ReactNode
})
{
const
searchParams
=
useSearchParams
();
const
visitorId
=
searchParams
.
get
(
"visitor_id"
);
localStorage
.
setItem
(
"visitor_id"
,
visitorId
||
""
);
return
(
return
(
<
DashboardLayout
>
<
DashboardLayout
>
{
children
}
{
children
}
...
...
src/components/pages/auth/register/index.tsx
View file @
7214ba54
...
@@ -116,7 +116,8 @@ export default function RegisterPage() {
...
@@ -116,7 +116,8 @@ export default function RegisterPage() {
dob
:
null
as
Dayjs
|
null
,
dob
:
null
as
Dayjs
|
null
,
city
:
''
,
city
:
''
,
pob
:
''
,
pob
:
''
,
agree
:
true
agree
:
true
,
visitor_id
:
undefined
,
}
}
const
{
deviceId
}
=
useSeon
();
const
{
deviceId
}
=
useSeon
();
const
{
handleSubmit
,
handleBlur
,
handleChange
,
errors
,
dirty
,
values
,
touched
,
setFieldValue
,
setFieldTouched
}
=
useFormik
(
const
{
handleSubmit
,
handleBlur
,
handleChange
,
errors
,
dirty
,
values
,
touched
,
setFieldValue
,
setFieldTouched
}
=
useFormik
(
...
@@ -125,6 +126,7 @@ export default function RegisterPage() {
...
@@ -125,6 +126,7 @@ export default function RegisterPage() {
validationSchema
,
validationSchema
,
onSubmit
:
async
(
values
)
=>
{
onSubmit
:
async
(
values
)
=>
{
const
formattedDob
=
values
.
dob
?
dayjs
(
values
.
dob
).
format
(
'YYYY-MM-DD'
)
:
''
;
const
formattedDob
=
values
.
dob
?
dayjs
(
values
.
dob
).
format
(
'YYYY-MM-DD'
)
:
''
;
const
userFromPropeelVisitorId
=
localStorage
.
getItem
(
"visitor_id"
);
try
{
try
{
const
response
=
await
registerUser
({
const
response
=
await
registerUser
({
email
:
values
.
emailAddress
,
email
:
values
.
emailAddress
,
...
@@ -140,7 +142,8 @@ export default function RegisterPage() {
...
@@ -140,7 +142,8 @@ export default function RegisterPage() {
city
:
values
.
city
,
city
:
values
.
city
,
pob
:
values
.
pob
,
pob
:
values
.
pob
,
agree
:
values
.
agree
,
agree
:
values
.
agree
,
device_id
:
deviceId
device_id
:
deviceId
,
visitor_id
:
userFromPropeelVisitorId
||
undefined
,
}).
unwrap
();
}).
unwrap
();
dispatch
(
dispatch
(
...
@@ -151,6 +154,7 @@ export default function RegisterPage() {
...
@@ -151,6 +154,7 @@ export default function RegisterPage() {
}),
}),
);
);
router
.
replace
(
`
${
PATH
.
AUTH
.
VERIFY_EMAIL
.
ROOT
}
?email=
${
values
.
emailAddress
}
`
);
router
.
replace
(
`
${
PATH
.
AUTH
.
VERIFY_EMAIL
.
ROOT
}
?email=
${
values
.
emailAddress
}
`
);
localStorage
.
removeItem
(
"visitor_id"
);
}
}
catch
(
e
:
any
)
{
catch
(
e
:
any
)
{
dispatch
(
dispatch
(
...
...
src/services/authApi.ts
View file @
7214ba54
...
@@ -8,19 +8,11 @@ export const authApi = createApi({
...
@@ -8,19 +8,11 @@ export const authApi = createApi({
baseQuery
:
baseQuery
,
baseQuery
:
baseQuery
,
endpoints
:
(
builder
)
=>
({
endpoints
:
(
builder
)
=>
({
registerUser
:
builder
.
mutation
<
{
success
:
boolean
,
data
:
LoginResponse
|
null
,
message
:
string
},
RegisterProps
>
({
registerUser
:
builder
.
mutation
<
{
success
:
boolean
,
data
:
LoginResponse
|
null
,
message
:
string
},
RegisterProps
>
({
query
:
({
email
,
query
:
(
body
)
=>
({
username
,
url
:
`/api/auth/register`
,
password
,
method
:
"POST"
,
password_confirmation
,
first_name
,
middle_name
,
last_name
,
phone
,
photoid_number
,
dob
,
city
,
pob
,
agree
,
device_id
})
=>
({
body
url
:
`/api/auth/register`
,
}),
method
:
"POST"
,
body
:
{
email
,
username
,
password
,
password_confirmation
,
first_name
,
middle_name
,
last_name
,
phone
,
photoid_number
,
dob
,
city
,
pob
,
agree
,
device_id
},
}),
}),
}),
login
:
builder
.
mutation
<
LoginResponse
,
LoginProps
>
({
login
:
builder
.
mutation
<
LoginResponse
,
LoginProps
>
({
...
@@ -37,11 +29,11 @@ export const authApi = createApi({
...
@@ -37,11 +29,11 @@ export const authApi = createApi({
body
:
{
email
},
body
:
{
email
},
})
})
}),
}),
verifyEmail
:
builder
.
mutation
<
GlobalResponse
,
{
id
:
string
;
hash
:
string
,
device_id
:
string
}
>
({
verifyEmail
:
builder
.
mutation
<
GlobalResponse
,
{
id
:
string
;
hash
:
string
,
device_id
:
string
}
>
({
query
:
({
id
,
hash
,
device_id
})
=>
({
query
:
({
id
,
hash
,
device_id
})
=>
({
url
:
"/api/auth/verify-email"
,
url
:
"/api/auth/verify-email"
,
method
:
"POST"
,
method
:
"POST"
,
body
:
{
id
,
hash
,
device_id
},
body
:
{
id
,
hash
,
device_id
},
})
})
}),
}),
forgotPassword
:
builder
.
mutation
<
GlobalResponse
,
{
email
:
string
}
>
({
forgotPassword
:
builder
.
mutation
<
GlobalResponse
,
{
email
:
string
}
>
({
...
...
src/types/auth.ts
View file @
7214ba54
...
@@ -41,4 +41,5 @@ export interface RegisterProps extends LoginProps {
...
@@ -41,4 +41,5 @@ export interface RegisterProps extends LoginProps {
pob
:
string
;
pob
:
string
;
agree
:
boolean
;
agree
:
boolean
;
device_id
?:
string
;
device_id
?:
string
;
visitor_id
?:
string
;
}
}
\ No newline at end of file
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