File tree 4 files changed +13
-8
lines changed
4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,11 @@ import { redirectIfNotNameOwner } from 'apps/web/src/utils/redirectIfNotNameOwne
7
7
import { formatDefaultUsername } from 'apps/web/src/utils/usernames' ;
8
8
9
9
export type ConfigureFramesProps = {
10
- params : { username : Basename } ;
10
+ params : Promise < { username : Basename } > ;
11
11
} ;
12
12
13
- export default async function ConfigureFrames ( { params } : ConfigureFramesProps ) {
13
+ export default async function ConfigureFrames ( props : ConfigureFramesProps ) {
14
+ const params = await props . params ;
14
15
let username = await formatDefaultUsername ( decodeURIComponent ( params . username ) as Basename ) ;
15
16
await redirectIfNotNameOwner ( username ) ;
16
17
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ const size = {
24
24
height : 630 ,
25
25
} ;
26
26
27
- export async function generateImageMetadata ( { params } : UsernameProfileProps ) {
27
+ export async function generateImageMetadata ( props : UsernameProfileProps ) {
28
+ const params = await props . params ;
28
29
let username = params . username ;
29
30
if (
30
31
username &&
Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ import classNames from 'classnames';
12
12
import { Metadata } from 'next' ;
13
13
14
14
export type UsernameProfileProps = {
15
- params : { username : Basename } ;
15
+ params : Promise < { username : Basename } > ;
16
16
} ;
17
17
18
- export async function generateMetadata ( { params } : UsernameProfileProps ) : Promise < Metadata > {
18
+ export async function generateMetadata ( props : UsernameProfileProps ) : Promise < Metadata > {
19
+ const params = await props . params ;
19
20
const username = await formatDefaultUsername ( params . username ) ;
20
21
const defaultDescription = `${ username } , a Basename` ;
21
22
const description = await getBasenameTextRecord ( username , UsernameTextRecordKeys . Description ) ;
@@ -34,7 +35,8 @@ export async function generateMetadata({ params }: UsernameProfileProps): Promis
34
35
} ;
35
36
}
36
37
37
- export default async function Username ( { params } : UsernameProfileProps ) {
38
+ export default async function Username ( props : UsernameProfileProps ) {
39
+ const params = await props . params ;
38
40
let username = await formatDefaultUsername ( decodeURIComponent ( params . username ) as Basename ) ;
39
41
await redirectIfNotNameOwner ( username ) ;
40
42
Original file line number Diff line number Diff line change @@ -23,8 +23,9 @@ export const metadata: Metadata = {
23
23
} ,
24
24
} ;
25
25
26
- type PageProps = { searchParams ?: { code ?: string } } ;
27
- export default async function Page ( { searchParams } : PageProps ) {
26
+ type PageProps = { searchParams ?: Promise < { code ?: string } > } ;
27
+ export default async function Page ( props : PageProps ) {
28
+ const searchParams = await props . searchParams ;
28
29
const code = searchParams ?. code ;
29
30
30
31
return (
You can’t perform that action at this time.
0 commit comments