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
8c75ba76
Commit
8c75ba76
authored
Sep 22, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-configured the private route layout for the user like profile and profile related routes
parent
3ca99732
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
14 additions
and
4 deletions
+14
-4
page.tsx
...ser)/(privateUser)/account/@page/deposit-history/page.tsx
+0
-0
page.tsx
...vateUser)/account/@page/profile/@section/account/page.tsx
+0
-0
page.tsx
...)/account/@page/profile/@section/change-password/page.tsx
+0
-0
page.tsx
...ivateUser)/account/@page/profile/@section/wallet/page.tsx
+0
-0
layout.tsx
...rd)/(user)/(privateUser)/account/@page/profile/layout.tsx
+0
-0
page.tsx
...oard)/(user)/(privateUser)/account/@page/profile/page.tsx
+0
-0
page.tsx
...r)/(privateUser)/account/@page/withdrawl-history/page.tsx
+0
-0
layout.tsx
src/app/(dashboard)/(user)/(privateUser)/account/layout.tsx
+0
-0
page.tsx
src/app/(dashboard)/(user)/(privateUser)/account/page.tsx
+0
-0
layout.tsx
src/app/(dashboard)/(user)/(privateUser)/layout.tsx
+10
-0
Private.tsx
src/routes/Private.tsx
+4
-4
No files found.
src/app/(dashboard)/(user)/account/@page/deposit-history/page.tsx
→
src/app/(dashboard)/(user)/
(privateUser)/
account/@page/deposit-history/page.tsx
View file @
8c75ba76
File moved
src/app/(dashboard)/(user)/account/@page/profile/@section/account/page.tsx
→
src/app/(dashboard)/(user)/
(privateUser)/
account/@page/profile/@section/account/page.tsx
View file @
8c75ba76
File moved
src/app/(dashboard)/(user)/account/@page/profile/@section/change-password/page.tsx
→
src/app/(dashboard)/(user)/
(privateUser)/
account/@page/profile/@section/change-password/page.tsx
View file @
8c75ba76
File moved
src/app/(dashboard)/(user)/account/@page/profile/@section/wallet/page.tsx
→
src/app/(dashboard)/(user)/
(privateUser)/
account/@page/profile/@section/wallet/page.tsx
View file @
8c75ba76
File moved
src/app/(dashboard)/(user)/account/@page/profile/layout.tsx
→
src/app/(dashboard)/(user)/
(privateUser)/
account/@page/profile/layout.tsx
View file @
8c75ba76
File moved
src/app/(dashboard)/(user)/account/@page/profile/page.tsx
→
src/app/(dashboard)/(user)/
(privateUser)/
account/@page/profile/page.tsx
View file @
8c75ba76
File moved
src/app/(dashboard)/(user)/account/@page/withdrawl-history/page.tsx
→
src/app/(dashboard)/(user)/
(privateUser)/
account/@page/withdrawl-history/page.tsx
View file @
8c75ba76
File moved
src/app/(dashboard)/(user)/account/layout.tsx
→
src/app/(dashboard)/(user)/
(privateUser)/
account/layout.tsx
View file @
8c75ba76
File moved
src/app/(dashboard)/(user)/account/page.tsx
→
src/app/(dashboard)/(user)/
(privateUser)/
account/page.tsx
View file @
8c75ba76
File moved
src/app/(dashboard)/(user)/(privateUser)/layout.tsx
0 → 100644
View file @
8c75ba76
import
Private
from
'@/routes/Private'
import
React
from
'react'
export
default
function
PrivateUserLayout
({
children
}:
{
children
:
React
.
ReactNode
})
{
return
(
<
Private
>
{
children
}
</
Private
>
)
}
src/routes/Private.tsx
View file @
8c75ba76
...
...
@@ -31,7 +31,7 @@ export default function Private({ children }: { children: React.ReactNode }) {
if
(
!
accessToken
||
isTokenExpired
(
accessToken
))
{
dispatch
(
clearTokens
());
// router.replace("/login
");
router
.
replace
(
"/
"
);
return
;
}
...
...
@@ -40,9 +40,9 @@ export default function Private({ children }: { children: React.ReactNode }) {
dispatch
(
setTokens
({
access_token
:
accessToken
,
user
:
user
||
null
}));
}
//
if (!user) {
// router.replace("/login
");
//
}
if
(
!
user
)
{
router
.
replace
(
"/
"
);
}
},
[
token
,
user
,
dispatch
,
router
]);
if
(
!
user
)
return
null
;
...
...
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