mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
Refactor authorize page to move Next.js dependencies into the page shell and have Next.js-agnostic code for the core logic. Add unit tests for authorize screen. ## Summary by CodeRabbit * **New Features** * New end-to-end API authorization UI: loading, error, invalid, approved, and main approval screens. * Organization selector with preselection, create-organization link, MCP warning, expiration handling, and approve/decline actions. * Improved page title handling via layout/head provider. * **Tests** * Added comprehensive component tests covering loading, error, approval flows, organization states, validation, and side effects.
29 lines
870 B
TypeScript
29 lines
870 B
TypeScript
import type { ReactNode } from 'react'
|
|
import { Card, CardContent, CardHeader } from 'ui'
|
|
import { ShimmeringLoader } from 'ui-patterns'
|
|
|
|
export function ApiAuthorizationLoadingScreen(): ReactNode {
|
|
return (
|
|
<Card>
|
|
<CardHeader>Authorize API access</CardHeader>
|
|
<CardContent>
|
|
<span className="sr-only">Loading...</span>
|
|
<div className="flex gap-x-4 items-center">
|
|
<ShimmeringLoader className="w-12 h-12 md:w-14 md:h-14" />
|
|
<ShimmeringLoader className="h-6 w-64" />
|
|
</div>
|
|
|
|
<div className="flex flex-col gap-y-2 mt-4">
|
|
<ShimmeringLoader className="w-1/4" />
|
|
<ShimmeringLoader />
|
|
</div>
|
|
|
|
<div className="flex flex-col gap-y-2 mt-8">
|
|
<ShimmeringLoader className="w-1/2" />
|
|
<ShimmeringLoader />
|
|
</div>
|
|
</CardContent>
|
|
</Card>
|
|
)
|
|
}
|