import dayjs from 'dayjs' import type { ReactNode } from 'react' import { Alert, AlertDescription, AlertTitle, Card, CardContent, CardHeader, CheckIcon } from 'ui' import { AuthorizeRequesterDetails } from '@/components/interfaces/Organization/OAuthApps/AuthorizeRequesterDetails' import type { ApiAuthorizationResponse } from '@/data/api-authorization/api-authorization-query' import type { Organization } from '@/types' export interface ApiAuthorizationApprovedScreenProps { requester: ApiAuthorizationResponse organization: Organization | undefined } export function ApiAuthorizationApprovedScreen({ requester, organization, }: ApiAuthorizationApprovedScreenProps): ReactNode { return ( Authorize API access for {requester.name} This authorization request has been approved

{requester.name} has been approved access to the organization " {organization?.name ?? 'Unknown'}" and all of its projects for the following scopes:

Approved on: {dayjs(requester.approved_at).format('DD MMM YYYY HH:mm:ss (ZZ)')}

) }