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
3c4fd8f7
Commit
3c4fd8f7
authored
Sep 25, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the minor changes like updated the dashboard
parent
7f087b39
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
DashboardProvider.tsx
...pp/(dashboard)/(user)/(outsideAuth)/DashboardProvider.tsx
+15
-0
page.tsx
src/app/(dashboard)/(user)/(outsideAuth)/page.tsx
+3
-0
No files found.
src/app/(dashboard)/(user)/(outsideAuth)/DashboardProvider.tsx
0 → 100644
View file @
3c4fd8f7
"use client"
import
{
useAppSelector
}
from
'@/hooks/hook'
import
React
from
'react'
export
default
function
DashboardProvider
({
children
}:
{
children
:
React
.
ReactNode
})
{
const
user
=
useAppSelector
(
state
=>
state
.
auth
.
user
);
if
(
user
?.
role
&&
user
.
role
.
toUpperCase
()
===
"ADMIN"
)
{
return
<>
<
h1
>
Admin Dashboard
</
h1
>
</>
}
return
(
<
div
>
{
children
}
</
div
>
)
}
src/app/(dashboard)/(user)/(outsideAuth)/page.tsx
View file @
3c4fd8f7
...
...
@@ -4,6 +4,7 @@ import ProtectedLink from "@/routes/ProtectedLink";
import
{
getAllGames
,
getSubGames
,
getUsp
}
from
"@/serverApi/game"
;
import
{
Tooltip
}
from
"@mui/material"
;
import
Image
from
"next/image"
;
import
DashboardProvider
from
"./DashboardProvider"
;
export
default
async
function
Home
()
{
let
games
=
null
;
...
...
@@ -40,6 +41,7 @@ export default async function Home() {
return
(
<
DashboardProvider
>
<>
<
Dashboard
/>
...
...
@@ -170,5 +172,6 @@ export default async function Home() {
</
div
>
<
UspSlider
uspData=
{
usps
.
data
||
[]
}
/>
</>
</
DashboardProvider
>
);
}
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