ApiAuthorization.Invalid.tsx28 lines · main
1import type { ReactNode } from 'react'
2import { Card, CardContent, CardHeader } from 'ui'
3
4export interface ApiAuthorizationInvalidScreenProps {
5 missingParameters: Array<string>
6}
7
8export function ApiAuthorizationInvalidScreen({
9 missingParameters,
10}: ApiAuthorizationInvalidScreenProps): ReactNode {
11 const isPlural = missingParameters.length > 1
12 const paragraphFontClass = 'text-sm text-muted-foreground'
13
14 return (
15 <Card>
16 <CardHeader>Missing parameters</CardHeader>
17 <CardContent className="flex flex-col gap-2">
18 <p className={paragraphFontClass}>
19 Cannot authorize this request because the URL is missing the following parameter
20 {isPlural ? 's' : ''}: {missingParameters.join(', ')}.
21 </p>
22 <p className={paragraphFontClass}>
23 If you followed a link here, please check the link and try again.
24 </p>
25 </CardContent>
26 </Card>
27 )
28}