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
bb7b467a
Commit
bb7b467a
authored
Mar 12, 2026
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes
parent
749b67d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
21 deletions
+4
-21
page.tsx
...d)/(user)/(outsideAuth)/buy-coins/[slug]/success/page.tsx
+4
-21
No files found.
src/app/(dashboard)/(user)/(
privateUser
)/buy-coins/[slug]/success/page.tsx
→
src/app/(dashboard)/(user)/(
outsideAuth
)/buy-coins/[slug]/success/page.tsx
View file @
bb7b467a
"use client"
"use client"
import
GlassWrapper
from
'@/components/molecules/GlassWrapper'
import
GlassWrapper
from
'@/components/molecules/GlassWrapper'
import
{
useAppSelector
}
from
'@/hooks/hook'
import
Image
from
'next/image'
import
Image
from
'next/image'
import
Link
from
'next/link'
import
Link
from
'next/link'
import
{
useParams
}
from
'next/navigation'
import
{
useParams
}
from
'next/navigation'
import
{
useEffect
}
from
'react'
export
default
function
PaymentSuccess
()
{
export
default
function
PaymentSuccess
()
{
const
params
=
useParams
();
const
params
=
useParams
();
const
slug
=
params
?.
slug
as
string
;
const
slug
=
params
?.
slug
as
string
;
const
user
=
useAppSelector
((
state
)
=>
state
.
auth
.
user
);
const
localUser
=
JSON
.
parse
(
localStorage
.
getItem
(
"token"
)
||
""
);
useEffect
(()
=>
{
console
.
log
(
"auth data"
,
{
user
,
localUser
:
localUser
});
const
storageKey
=
`payment-success-
${
slug
}
`
;
const
hasLoaded
=
sessionStorage
.
getItem
(
storageKey
);
if
(
!
hasLoaded
)
{
console
.
log
(
"First visit - reloading page"
);
sessionStorage
.
setItem
(
storageKey
,
'true'
);
window
.
location
.
reload
();
return
;
}
console
.
log
(
"Page already loaded once - rendering content"
);
// Clean up after 5 seconds (user has seen the page)
const
timeout
=
setTimeout
(()
=>
{
sessionStorage
.
removeItem
(
storageKey
);
},
5000
);
return
()
=>
clearTimeout
(
timeout
);
},
[
slug
]);
return
(
return
(
<
GlassWrapper
className=
"max-w-[520px] mx-auto flex flex-col gap-3 items-center text-center p-6"
>
<
GlassWrapper
className=
"max-w-[520px] mx-auto flex flex-col gap-3 items-center text-center p-6"
>
...
...
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