Files
supabase/apps/studio/components/layouts/StorageLayout/StorageBucketsError.tsx
T
Ivan Vasilov 436bdb10ae chore: Move the studio app to apps/studio (#18915)
* Move all studio files from /studio to /apps/studio.

* Move studio specific prettier ignores.

* Fix the ui references from studio.

* Fix the css imports.

* Fix all package.json issues.

* Fix the prettier setup for the studio app.

* Add .turbo folder to prettierignore.

* Fix the github workflows.
2023-11-15 12:38:55 +01:00

41 lines
1.1 KiB
TypeScript

import { useParams } from 'common'
import Link from 'next/link'
import { ResponseError } from 'types'
import { Alert, Button } from 'ui'
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">
<Link
href={`/support/new?ref=${ref}&category=dashboard_bug&subject=Unable%20to%20fetch%20storage%20buckets`}
>
Contact support
</Link>
</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