mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 03:45:06 +03:00
## Problem Some pages still use the old `<Alert>` component ## Solution - [x] Use the new `<Admonition>` - [x] Remove `<Alert>` ## Screenshots ### Table Editor - Disable RLS modal Before: <img width="582" height="527" alt="image" src="https://github.com/user-attachments/assets/bbc5b874-2569-4cd6-98c0-5edd5ac78e0f" /> After: <img width="543" height="505" alt="image" src="https://github.com/user-attachments/assets/bb1da899-2163-4b26-ba0b-74726e0cb5df" /> ### Organization Billing Before: <img width="1111" height="512" alt="image" src="https://github.com/user-attachments/assets/6fb410fb-9ac0-4fb7-8dde-e304ddee7ece" /> After: <img width="1103" height="531" alt="image" src="https://github.com/user-attachments/assets/6eda6ede-edc6-482f-ab9c-d085402cbd64" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Replaced Alert UIs with Admonition across billing, settings, storage, integrations, and editor interfaces. * Removed the deprecated AlphaPreview component. * **Chores** * Removed the Alert component from the UI library, including its styles, tests, and theme configuration. [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45797) <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
import { SupportCategories } from '@supabase/shared-types/out/constants'
|
|
import { useParams } from 'common'
|
|
import { Button } from 'ui'
|
|
import { Admonition } from 'ui-patterns/admonition'
|
|
|
|
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 grow">
|
|
<div>
|
|
<Admonition
|
|
type="warning"
|
|
layout="horizontal"
|
|
title="Failed to fetch buckets"
|
|
description={
|
|
<>
|
|
<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>
|
|
</>
|
|
}
|
|
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>
|
|
}
|
|
/>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default StorageBucketsError
|