ApiAuthorization.Invalid.tsx 921 B

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