mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 22:29:11 +03:00
## Problem We now export components under a subpath in ui-patterns to avoid barrel files as they slow down every tools (from IDE to linters, etc.) and may also affect bundles our users have to download. ## Solution - Remove the UI patterns index file - Fix invalid impors
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import Link from 'next/link'
|
|
import type { ReactNode } from 'react'
|
|
import { Button } from 'ui'
|
|
import { Admonition } from 'ui-patterns/admonition'
|
|
|
|
import { InterstitialLayout, SupabaseLogo } from '@/components/layouts/InterstitialLayout'
|
|
|
|
export interface ApiAuthorizationInvalidScreenProps {
|
|
missingParameters: Array<string>
|
|
}
|
|
|
|
export function ApiAuthorizationInvalidScreen({
|
|
missingParameters,
|
|
}: ApiAuthorizationInvalidScreenProps): ReactNode {
|
|
const isPlural = missingParameters.length > 1
|
|
|
|
return (
|
|
<InterstitialLayout
|
|
logo={<SupabaseLogo />}
|
|
title="Missing authorization link"
|
|
description="This authorization request cannot be completed"
|
|
>
|
|
<div className="flex flex-col gap-3 px-6 pb-6">
|
|
<Admonition
|
|
type="warning"
|
|
description={`Retry the authorization request from the requesting app. The URL is missing parameter${
|
|
isPlural ? 's' : ''
|
|
}: ${missingParameters.join(', ')}.`}
|
|
/>
|
|
<Button variant="default" block asChild>
|
|
<Link href="/">Back to dashboard</Link>
|
|
</Button>
|
|
</div>
|
|
</InterstitialLayout>
|
|
)
|
|
}
|