fix: alinhar searchParams da página de erro de autenticação ao contrato do Next 16
This commit is contained in:
parent
72b25fafab
commit
9c74e10675
1 changed files with 9 additions and 9 deletions
|
|
@ -7,14 +7,15 @@ export const metadata: Metadata = {
|
||||||
title: "Falha na autenticação da dispositivo",
|
title: "Falha na autenticação da dispositivo",
|
||||||
}
|
}
|
||||||
|
|
||||||
type AuthErrorPageProps = {
|
export default async function MachinesAuthErrorPage({
|
||||||
searchParams?: {
|
searchParams,
|
||||||
reason?: string
|
}: {
|
||||||
}
|
searchParams: Promise<Record<string, string | string[] | undefined>>
|
||||||
}
|
}) {
|
||||||
|
const params = await searchParams
|
||||||
export default function MachinesAuthErrorPage({ searchParams }: AuthErrorPageProps) {
|
const rawReason = params.reason
|
||||||
const reason = (searchParams?.reason ?? "invalid_token").toString()
|
const reasonValue = Array.isArray(rawReason) ? rawReason[0] : rawReason
|
||||||
|
const reason = (reasonValue ?? "invalid_token").toString()
|
||||||
|
|
||||||
const subtitle =
|
const subtitle =
|
||||||
reason === "invalid_token"
|
reason === "invalid_token"
|
||||||
|
|
@ -45,4 +46,3 @@ export default function MachinesAuthErrorPage({ searchParams }: AuthErrorPagePro
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue