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