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
c6fc26d8
Commit
c6fc26d8
authored
Jan 20, 2026
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the detail page
parent
df604ac3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
50 deletions
+30
-50
page.tsx
...board)/(user)/(outsideAuth)/exclusive-games/[id]/page.tsx
+30
-50
No files found.
src/app/(dashboard)/(user)/(outsideAuth)/exclusive-games/[id]/page.tsx
View file @
c6fc26d8
import
ExclusiveGameDetail
from
"@/components/pages/dashboard/userDashboard/games/exclusiveGames/exclusiveGameDetail"
;
import
{
getAllGames
,
getSingleGame
}
from
"@/serverApi/game"
;
import
{
Metadata
}
from
"next"
;
import
{
notFound
}
from
"next/navigation"
;
const
SITE_URL
=
process
.
env
.
NEXT_PUBLIC_FRONTEND_URL
!
;
type
PageProps
=
{
params
:
{
id
:
string
};
};
export
async
function
generateMetadata
(
{
params
}:
PageProps
):
Promise
<
Metadata
>
{
try
{
const
{
id
}
=
params
;
const
canonicalUrl
=
`
${
SITE_URL
}
/exclusive-games/
${
id
}
`
.
replace
(
/
\/
$/
,
""
);
const
game
=
await
getSingleGame
(
id
);
if
(
!
game
?.
data
)
{
return
{};
}
export
async
function
generateMetadata
(
props
:
{
params
:
Promise
<
{
id
:
string
}
>
}):
Promise
<
Metadata
>
{
const
{
id
}
=
await
props
.
params
;
const
canonicalUrl
=
`
${
SITE_URL
}
/exclusive-games/
${
id
}
`
.
replace
(
/
\/
$/
,
""
);
const
game
=
await
getSingleGame
(
id
);
return
{
title
:
game
.
data
.
meta
?.
meta_title
||
game
.
data
.
name
,
description
:
game
.
data
.
meta
?.
meta_description
||
game
.
data
.
name
,
openGraph
:
{
title
:
game
.
data
.
meta
?.
meta_title
||
game
.
data
.
name
,
description
:
game
.
data
.
meta
?.
meta_description
||
game
.
data
.
name
,
images
:
game
.
data
.
meta
?.
og_image_url
,
},
twitter
:
{
title
:
game
.
data
.
meta
?.
meta_title
||
game
.
data
.
name
,
description
:
game
.
data
.
meta
?.
meta_description
||
game
.
data
.
name
,
images
:
game
.
data
.
meta
?.
og_image_url
,
},
alternates
:
{
canonical
:
canonicalUrl
,
},
};
}
catch
{
return
{};
}
return
{
title
:
game
?.
data
?.
meta
?.
meta_title
||
game
?.
data
?.
name
,
description
:
game
?.
data
?.
meta
?.
meta_description
||
game
?.
data
?.
name
,
openGraph
:
{
title
:
game
?.
data
?.
meta
?.
meta_title
||
game
?.
data
?.
name
,
description
:
game
?.
data
?.
meta
?.
meta_description
||
game
?.
data
?.
name
,
images
:
game
?.
data
?.
meta
?.
og_image_url
},
twitter
:
{
title
:
game
?.
data
?.
meta
?.
meta_title
||
game
?.
data
?.
name
,
description
:
game
?.
data
?.
meta
?.
meta_description
||
game
?.
data
?.
name
,
images
:
game
?.
data
?.
meta
?.
og_image_url
},
alternates
:
{
canonical
:
canonicalUrl
,
},
};
}
export
async
function
generateStaticParams
()
{
const
res
=
await
getAllGames
();
const
games
=
res
?.
data
?.
data
??
[];
const
res
=
await
getAllGames
()
return
games
.
filter
((
game
:
any
)
=>
game
?.
id
)
.
map
((
game
:
any
)
=>
({
id
:
String
(
game
.
id
),
}));
const
games
=
res
?.
data
?.
data
??
[]
return
games
.
map
((
game
:
any
)
=>
({
id
:
String
(
game
.
id
),
}))
}
export
const
dynamic
=
"force-static"
;
export
const
dynamic
=
'force-static'
;
export
default
async
function
UserGameDetail
(
{
params
}:
PageProps
)
{
const
{
id
}
=
params
;
export
default
async
function
UserGameDetail
(
props
:
{
params
:
Promise
<
{
id
:
string
}
>
}
)
{
const
{
id
}
=
await
props
.
params
;
const
game
=
await
getSingleGame
(
id
);
if
(
!
game
?.
data
)
{
notFound
();
}
return
<
ExclusiveGameDetail
game=
{
game
}
/>;
}
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