mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 04:15:04 +03:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { SupportCategories } from '@supabase/shared-types/out/constants'
|
|
import { useParams } from 'common'
|
|
import { Alert, Button } from 'ui'
|
|
|
|
import { SupportLink } from '../Support/SupportLink'
|
|
import type { ResponseError } from '@/types'
|
|
|
|
export interface StorageBucketsErrorProps {
|
|
error: ResponseError
|
|
}
|
|
|
|
const StorageBucketsError = ({ error }: StorageBucketsErrorProps) => {
|
|
const { ref } = useParams()
|
|
|
|
return (
|
|
<div className="storage-container flex items-center justify-center flex-grow">
|
|
<div>
|
|
<Alert
|
|
withIcon
|
|
variant="warning"
|
|
title="Failed to fetch buckets"
|
|
actions={[
|
|
<Button key="contact-support" asChild type="default" className="ml-4">
|
|
<SupportLink
|
|
queryParams={{
|
|
projectRef: ref,
|
|
category: SupportCategories.DASHBOARD_BUG,
|
|
subject: 'Unable to fetch storage buckets',
|
|
}}
|
|
>
|
|
Contact support
|
|
</SupportLink>
|
|
</Button>,
|
|
]}
|
|
>
|
|
<p className="mb-1">
|
|
Please try refreshing your browser, or contact support if the issue persists
|
|
</p>
|
|
<p>Error: {(error as any)?.message ?? 'Unknown'}</p>
|
|
</Alert>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default StorageBucketsError
|