Skip to content

Commit 155e622

Browse files
committed
throw search params into function
1 parent 6a798f0 commit 155e622

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

site/src/app/redirect/page.tsx

+8-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@
33
import { useSearchParams } from 'next/navigation'
44
import { Suspense } from 'react'
55

6-
export default function Page() {
6+
function Search() {
77
const searchParams = useSearchParams()
88
const game = searchParams.get('game')
99
const urlPrefix = "0; URL=com.epicgames.launcher://store"
1010
var content = game == null ? urlPrefix : urlPrefix + "/p/" + game
11-
return <Suspense>
12-
<head className='redirect'>
11+
12+
return <head className='redirect'>
1313
<meta http-equiv="refresh" content={content}/>
1414
redirecting to desktop app ...
1515
</head>
16+
}
17+
18+
export default function Page() {
19+
return <Suspense>
20+
<Search/>
1621
</Suspense>
1722
}

0 commit comments

Comments
 (0)