The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore(studio): show toast after copying strings to clipboard (#41401)
Francesco Sansalvadore76c86731bab2
diff --git a/apps/studio/components/interfaces/App/CommandMenu/ApiKeys.tsx b/apps/studio/components/interfaces/App/CommandMenu/ApiKeys.tsxindex e1ff48a069c..f796154f6da 100644--- a/apps/studio/components/interfaces/App/CommandMenu/ApiKeys.tsx+++ b/apps/studio/components/interfaces/App/CommandMenu/ApiKeys.tsx@@ -16,6 +16,7 @@ import {} from 'ui-patterns/CommandMenu'import { COMMAND_MENU_SECTIONS } from './CommandMenu.utils'import { orderCommandSectionsByPriority } from './ordering'+import { toast } from 'sonner'const API_KEYS_PAGE_NAME = 'API Keys'@@ -46,7 +47,9 @@ export function useApiKeysCommands() {id: 'publishable-key',name: `Copy publishable key`,action: () => {- copyToClipboard(publishableKey.api_key ?? '')+ copyToClipboard(publishableKey.api_key ?? '', () => {+ toast.success('Publishable key copied to clipboard')+ })setIsOpen(false)},badge: () => (@@ -62,7 +65,9 @@ export function useApiKeysCommands() {id: key.id,name: `Copy secret key (${key.name})`,action: () => {- copyToClipboard(key.api_key ?? '')+ copyToClipboard(key.api_key ?? '', () => {+ toast.success('Secret key copied to clipboard')+ })setIsOpen(false)},badge: () => (@@ -79,7 +84,9 @@ export function useApiKeysCommands() {id: 'anon-key',name: `Copy anonymous API key`,action: () => {- copyToClipboard(anonKey.api_key ?? '')+ copyToClipboard(anonKey.api_key ?? '', () => {+ toast.success('Anonymous API key copied to clipboard')+ })setIsOpen(false)},badge: () => (@@ -96,7 +103,9 @@ export function useApiKeysCommands() {id: 'service-key',name: `Copy service API key`,action: () => {- copyToClipboard(serviceKey.api_key ?? '')+ copyToClipboard(serviceKey.api_key ?? '', () => {+ toast.success('Service key copied to clipboard')+ })setIsOpen(false)},badge: () => (diff --git a/apps/studio/components/interfaces/App/CommandMenu/ApiUrl.tsx b/apps/studio/components/interfaces/App/CommandMenu/ApiUrl.tsxindex f84d8c6bb41..b29bfc5415b 100644--- a/apps/studio/components/interfaces/App/CommandMenu/ApiUrl.tsx+++ b/apps/studio/components/interfaces/App/CommandMenu/ApiUrl.tsx@@ -6,6 +6,7 @@ import { Badge, copyToClipboard } from 'ui'import { useRegisterCommands, useSetCommandMenuOpen } from 'ui-patterns/CommandMenu'import { COMMAND_MENU_SECTIONS } from './CommandMenu.utils'import { orderCommandSectionsByPriority } from './ordering'+import { toast } from 'sonner'export function useApiUrlCommand() {const setIsOpen = useSetCommandMenuOpen()@@ -27,7 +28,9 @@ export function useApiUrlCommand() {id: 'api-url',name: 'Copy API URL',action: () => {- copyToClipboard(apiUrl ?? '')+ copyToClipboard(apiUrl ?? '', () => {+ toast.success('API URL copied to clipboard')+ })setIsOpen(false)},icon: () => <Link />,