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
3ca99732
Commit
3ca99732
authored
Sep 22, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
took out the user based route from private
parent
912dc31e
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
32 additions
and
19 deletions
+32
-19
page.tsx
src/app/(dashboard)/(admin)/games/[slug]/page.tsx
+0
-0
page.tsx
src/app/(dashboard)/(admin)/games/add-game/page.tsx
+0
-0
page.tsx
src/app/(dashboard)/(admin)/games/edit-game/[id]/page.tsx
+0
-0
page.tsx
src/app/(dashboard)/(admin)/games/page.tsx
+0
-0
layout.tsx
src/app/(dashboard)/(admin)/layout.tsx
+10
-0
page.tsx
src/app/(dashboard)/(admin)/pages/[slug]/page.tsx
+0
-0
page.tsx
src/app/(dashboard)/(admin)/pages/add-page/page.tsx
+0
-0
page.tsx
src/app/(dashboard)/(admin)/pages/page.tsx
+0
-0
page.tsx
src/app/(dashboard)/(admin)/players/[id]/page.tsx
+0
-0
page.tsx
src/app/(dashboard)/(admin)/players/add-player/page.tsx
+0
-0
page.tsx
...app/(dashboard)/(admin)/players/edit-player/[id]/page.tsx
+0
-0
page.tsx
src/app/(dashboard)/(admin)/players/page.tsx
+0
-0
page.tsx
src/app/(dashboard)/(admin)/settings/page.tsx
+0
-0
layout.tsx
src/app/(dashboard)/layout.tsx
+3
-6
index.tsx
src/components/organism/Header/UserHeader/index.tsx
+7
-4
index.tsx
src/components/organism/Sidebar/UserSidebar/index.tsx
+7
-4
Private.tsx
src/routes/Private.tsx
+4
-4
index.tsx
src/theme/index.tsx
+1
-1
No files found.
src/app/(dashboard)/games/[slug]/page.tsx
→
src/app/(dashboard)/
(admin)/
games/[slug]/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/games/add-game/page.tsx
→
src/app/(dashboard)/
(admin)/
games/add-game/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/games/edit-game/[id]/page.tsx
→
src/app/(dashboard)/
(admin)/
games/edit-game/[id]/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/games/page.tsx
→
src/app/(dashboard)/
(admin)/
games/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/(admin)/layout.tsx
0 → 100644
View file @
3ca99732
import
Private
from
'@/routes/Private'
import
React
from
'react'
export
default
function
AdminLayout
({
children
}:
{
children
:
React
.
ReactNode
})
{
return
(
<
Private
>
{
children
}
</
Private
>
)
}
src/app/(dashboard)/pages/[slug]/page.tsx
→
src/app/(dashboard)/
(admin)/
pages/[slug]/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/pages/add-page/page.tsx
→
src/app/(dashboard)/
(admin)/
pages/add-page/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/pages/page.tsx
→
src/app/(dashboard)/
(admin)/
pages/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/players/[id]/page.tsx
→
src/app/(dashboard)/
(admin)/
players/[id]/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/players/add-player/page.tsx
→
src/app/(dashboard)/
(admin)/
players/add-player/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/players/edit-player/[id]/page.tsx
→
src/app/(dashboard)/
(admin)/
players/edit-player/[id]/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/players/page.tsx
→
src/app/(dashboard)/
(admin)/
players/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/settings/page.tsx
→
src/app/(dashboard)/
(admin)/
settings/page.tsx
View file @
3ca99732
File moved
src/app/(dashboard)/layout.tsx
View file @
3ca99732
import
DashboardLayout
from
'@/components/layouts/DashboardLayout'
import
Private
from
'@/routes/Private'
import
React
from
'react'
export
default
function
DashboardRootLayout
({
children
}:
{
children
:
React
.
ReactNode
})
{
return
(
<
Private
>
<
DashboardLayout
>
{
children
}
</
DashboardLayout
>
</
Private
>
<
DashboardLayout
>
{
children
}
</
DashboardLayout
>
)
}
src/components/organism/Header/UserHeader/index.tsx
View file @
3ca99732
...
...
@@ -6,15 +6,18 @@ import CoinCard from '@/components/molecules/CoinCard'
import
GoldCoinIcon
from
'@/icons/GoldCoinIcon'
import
SilverCoinIcon
from
'@/icons/SilverCoinIcon'
import
UserCoinCard
from
'./UserCoinCard'
import
Private
from
'@/routes/Private'
export
default
function
UserHeader
()
{
return
(
<
Box
className=
'flex items-center gap-4 justify-between w-full'
>
<
AdminSearchBar
/>
<
div
className=
"right flex items-center gap-4"
>
<
UserCoinCard
/>
<
Profile
/>
</
div
>
<
Private
>
<
div
className=
"right flex items-center gap-4"
>
<
UserCoinCard
/>
<
Profile
/>
</
div
>
</
Private
>
</
Box
>
)
}
src/components/organism/Sidebar/UserSidebar/index.tsx
View file @
3ca99732
import
SupportIcon
from
'@/app/customIcons/SupportIcon'
;
import
{
PATH
}
from
'@/routes/PATH'
;
import
Private
from
'@/routes/Private'
;
import
{
Box
,
Button
,
List
,
ListItem
,
ListItemButton
,
ListItemIcon
,
ListItemText
,
Typography
}
from
'@mui/material'
import
{
Home
,
MessageQuestion
,
ReceiptEdit
,
RecordCircle
,
StatusUp
,
UserEdit
}
from
'@wandersonalwes/iconsax-react'
;
import
{
usePathname
,
useRouter
}
from
'next/navigation'
;
...
...
@@ -10,10 +11,12 @@ export default function UserMenu({ open }: { open: boolean }) {
const
router
=
useRouter
();
return
(
<
Box
>
{
open
?
<
div
className=
"flex justify-between items-center gap-1 mb-6"
>
<
Button
variant=
'contained'
color=
'primary'
>
Buy Coins
</
Button
>
<
Button
variant=
'contained'
color=
'secondary'
>
Withdraw
</
Button
>
</
div
>
:
null
}
{
open
?
<
Private
>
<
div
className=
"flex justify-between items-center gap-1 mb-6"
>
<
Button
variant=
'contained'
color=
'primary'
>
Buy Coins
</
Button
>
<
Button
variant=
'contained'
color=
'secondary'
>
Withdraw
</
Button
>
</
div
>
</
Private
>
:
null
}
<
div
className=
"flex flex-col gap-16 lg:gap-28"
>
<
List
>
...
...
src/routes/Private.tsx
View file @
3ca99732
...
...
@@ -31,7 +31,7 @@ export default function Private({ children }: { children: React.ReactNode }) {
if
(
!
accessToken
||
isTokenExpired
(
accessToken
))
{
dispatch
(
clearTokens
());
router
.
replace
(
"/login"
);
//
router.replace("/login");
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("/login");
//
}
},
[
token
,
user
,
dispatch
,
router
]);
if
(
!
user
)
return
null
;
...
...
src/theme/index.tsx
View file @
3ca99732
...
...
@@ -22,7 +22,7 @@ export default function ThemeCustomization({ children }: { children: React.React
React
.
useEffect
(()
=>
{
if
(
!
user
||
!
user
.
role
)
{
setTheme
(
ThemeMode
.
DARK
);
setPalette
(
Admin
Palette
(
ThemeMode
.
DARK
));
setPalette
(
Palette
(
ThemeMode
.
DARK
));
}
else
if
(
user
.
role
.
toUpperCase
()
===
"USER"
)
{
setTheme
(
ThemeMode
.
DARK
);
setPalette
(
Palette
(
ThemeMode
.
DARK
));
...
...
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