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
f95a2964
Commit
f95a2964
authored
Mar 04, 2026
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
displayed the verifying status in the user profile
parent
b01ec1f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
Profile.tsx
src/components/organism/Header/Profile.tsx
+9
-2
AgeGate.tsx
src/components/organism/dialog/AgeGate.tsx
+0
-4
No files found.
src/components/organism/Header/Profile.tsx
View file @
f95a2964
import
Avatar
from
'@/components/atom/Avatar'
;
import
Avatar
from
'@/components/atom/Avatar'
;
import
{
useAppDispatch
,
useAppSelector
}
from
'@/hooks/hook'
;
import
{
useAppDispatch
,
useAppSelector
}
from
'@/hooks/hook'
;
import
{
PATH
}
from
'@/routes/PATH'
;
import
{
PATH
}
from
'@/routes/PATH'
;
import
{
useGetAgeGateUuidQuery
}
from
'@/services/authApi'
;
import
{
clearTokens
}
from
'@/slice/authSlice'
;
import
{
clearTokens
}
from
'@/slice/authSlice'
;
import
{
Box
,
ClickAwayListener
,
Fade
,
List
,
ListItem
,
ListItemButton
,
ListItemIcon
,
ListItemText
,
Paper
,
Popper
}
from
'@mui/material'
;
import
{
Box
,
ClickAwayListener
,
Fade
,
List
,
ListItem
,
ListItemButton
,
ListItemIcon
,
ListItemText
,
Paper
,
Popper
}
from
'@mui/material'
;
import
{
ArrowDown2
,
Coin
,
Logout
,
MoneySend
,
Profile
,
Wallet2
}
from
"@wandersonalwes/iconsax-react"
;
import
{
ArrowDown2
,
Coin
,
Logout
,
MoneySend
,
Profile
,
TickCircle
,
Wallet2
}
from
"@wandersonalwes/iconsax-react"
;
import
Link
from
'next/link'
;
import
Link
from
'next/link'
;
import
{
usePathname
,
useRouter
,
useSearchParams
}
from
'next/navigation'
;
import
{
usePathname
,
useRouter
,
useSearchParams
}
from
'next/navigation'
;
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
React
,
{
useRef
,
useState
}
from
'react'
;
...
@@ -104,6 +105,9 @@ export default function ProfileBlock() {
...
@@ -104,6 +105,9 @@ export default function ProfileBlock() {
const
handleMouseLeave
=
()
=>
{
const
handleMouseLeave
=
()
=>
{
setGlassStyle
((
prev
)
=>
({
...
prev
,
opacity
:
0
}));
setGlassStyle
((
prev
)
=>
({
...
prev
,
opacity
:
0
}));
};
};
const
{
data
}
=
useGetAgeGateUuidQuery
();
return
(
return
(
<
Box
>
<
Box
>
<
a
<
a
...
@@ -117,7 +121,7 @@ export default function ProfileBlock() {
...
@@ -117,7 +121,7 @@ export default function ProfileBlock() {
padding
:
0
padding
:
0
}
}
}
}
>
>
<
div
className=
' lg:flex items-center gap-1'
>
<
div
className=
' lg:flex items-center gap-1
relative
'
>
<
Avatar
alt=
"profile user"
src=
{
avataur1
}
/>
<
Avatar
alt=
"profile user"
src=
{
avataur1
}
/>
{
user
?.
role
&&
user
.
role
.
toLowerCase
()
!==
"user"
?
<>
{
user
?.
role
&&
user
.
role
.
toLowerCase
()
!==
"user"
?
<>
<
div
className=
' hidden lg:block'
>
<
div
className=
' hidden lg:block'
>
...
@@ -128,6 +132,9 @@ export default function ProfileBlock() {
...
@@ -128,6 +132,9 @@ export default function ProfileBlock() {
</
div
>
</
div
>
<
ArrowDown2
size=
{
14
}
className=
'text-primary hidden lg:block'
/>
<
ArrowDown2
size=
{
14
}
className=
'text-primary hidden lg:block'
/>
</>
:
""
}
</>
:
""
}
<
div
className=
"absolute bottom-0 right-0"
>
{
data
?.
data
?.
is_age_verified
?
<
TickCircle
variant=
'Bold'
size=
{
16
}
className=
"text-green-500"
/>
:
<
TickCircle
variant=
'Bold'
size=
{
16
}
className=
"text-white"
/>
}
</
div
>
</
div
>
</
div
>
</
a
>
</
a
>
<
Popper
<
Popper
...
...
src/components/organism/dialog/AgeGate.tsx
View file @
f95a2964
...
@@ -6,7 +6,6 @@ import { useCallback, useEffect } from "react";
...
@@ -6,7 +6,6 @@ import { useCallback, useEffect } from "react";
export
default
function
AgeGate
()
{
export
default
function
AgeGate
()
{
const
{
data
,
isSuccess
}
=
useGetAgeGateUuidQuery
();
const
{
data
,
isSuccess
}
=
useGetAgeGateUuidQuery
();
const
[
verifyAgeGate
]
=
useVerifyAgeGateMutation
();
const
[
verifyAgeGate
]
=
useVerifyAgeGateMutation
();
const
handleSuccess
=
useCallback
(
async
(
uuid
:
string
)
=>
{
const
handleSuccess
=
useCallback
(
async
(
uuid
:
string
)
=>
{
try
{
try
{
await
verifyAgeGate
({
age_verify_uuid
:
uuid
}).
unwrap
();
await
verifyAgeGate
({
age_verify_uuid
:
uuid
}).
unwrap
();
...
@@ -38,14 +37,11 @@ export default function AgeGate() {
...
@@ -38,14 +37,11 @@ export default function AgeGate() {
},
},
onpagehide
:
()
=>
{
onpagehide
:
()
=>
{
(
window
as
any
).
AgeCheckerAPI
.
close
();
(
window
as
any
).
AgeCheckerAPI
.
close
();
// Optional: Handle page hide if needed
}
}
};
};
// 3. Now load the script
const
existing
=
document
.
querySelector
(
'script[src*="agechecker.net"]'
);
const
existing
=
document
.
querySelector
(
'script[src*="agechecker.net"]'
);
if
(
existing
)
{
if
(
existing
)
{
// Script already loaded, just show
(
window
as
any
).
AgeCheckerAPI
?.
show
(
uuid
);
(
window
as
any
).
AgeCheckerAPI
?.
show
(
uuid
);
return
;
return
;
}
}
...
...
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