Skip to content

Commit 4aa4cf9

Browse files
committed
adds ?celestial searchparam to player/id route
1 parent 624c8c5 commit 4aa4cf9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/player/[id]/page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ import PlayerCard from '@/components/PlayerCard/PlayerCard'
22

33
import { getUserPublicProfileByPlayerId } from '@/app/actions/db/users'
44

5+
type SearchParams = Promise<{ celestial?: boolean }>
56
export default async function ProfilePage({
67
params,
8+
searchParams,
79
}: {
810
params: Promise<{ id: string }>
11+
searchParams: SearchParams
912
}) {
13+
const { celestial = false } = await searchParams
1014
const { id } = await params
1115
let uuid: string | null
1216
if (id.length === 4) {
@@ -23,7 +27,7 @@ export default async function ProfilePage({
2327
userId={uuid}
2428
tiltFactor={2.5}
2529
gleamFollowsTilt
26-
asCelestialCard={false}
30+
asCelestialCard={celestial}
2731
/>
2832
</div>
2933
)

0 commit comments

Comments
 (0)