mirror of
https://github.com/supabase/supabase.git
synced 2026-07-03 18:54:26 +08:00
* Update studio testing setup files Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components * fix missing listen call for msw, resolve test type error * fix imports * Update studio testing setup files Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components * fix missing listen call for msw, resolve test type error * fix imports * Move non-layout Storage related components to `components/interfaces` * Fix paths --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { useParams } from 'common'
|
|
import Link from 'next/link'
|
|
import type { 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?projectRef=${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
|