mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 03:15:06 +03:00
## Problem The `alternative` variant for `<Button>` has been deprecated but is still used in a few places. ## Solution - Migrate usages to the recommended `primary` variant - Delete the `alternative` variant <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated several buttons across forms, logs, recent queries, and release headers to use the primary visual style. * Button styling is now more consistent throughout the app, with a cleaner default emphasis for key actions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import { Play } from 'lucide-react'
|
|
import { useRouter } from 'next/router'
|
|
import { Button } from 'ui'
|
|
|
|
import SqlSnippetCode from './Logs.SqlSnippetCode'
|
|
import Table from '@/components/to-be-cleaned/Table'
|
|
import type { LogSqlSnippets } from '@/types'
|
|
|
|
interface Props {
|
|
item: LogSqlSnippets.Content
|
|
}
|
|
|
|
const RecentQueriesItem: React.FC<Props> = ({ item }) => {
|
|
const router = useRouter()
|
|
const { ref } = router.query
|
|
|
|
return (
|
|
<Table.tr key={item.sql}>
|
|
<Table.td
|
|
className={`expanded-row-content border-l border-r bg-alternative px-3! pt-0! pb-0! transition-all`}
|
|
>
|
|
<SqlSnippetCode>{item.sql}</SqlSnippetCode>
|
|
</Table.td>
|
|
<Table.td className="text-right">
|
|
<Button
|
|
variant="primary"
|
|
iconRight={<Play size={10} />}
|
|
onClick={() =>
|
|
router.push(`/project/${ref}/logs/explorer?q=${encodeURIComponent(item.sql)}`)
|
|
}
|
|
>
|
|
Run
|
|
</Button>
|
|
</Table.td>
|
|
</Table.tr>
|
|
)
|
|
}
|
|
|
|
export default RecentQueriesItem
|