Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(studio): invoke function snippet overflows (#40455)

Kalleby Santoseddc929bff91
diff --git a/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx b/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx
index f32bddfdc47..9320f44a7e5 100644
--- a/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx
+++ b/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx
@@ -367,7 +367,10 @@ export const EdgeFunctionDetails = () => {
<TabsContent key={tab.id} value={tab.id} className="mt-4 px-6">
<CodeBlock
value={code}
- className="p-0 text-xs !mt-0 border-none [&>code]:!whitespace-pre-wrap [&>code]:break-words"
+ className={cn(
+ 'p-0 text-xs !mt-0 border-none [&>code]:!whitespace-pre-wrap',
+ showKey ? '[&>code]:break-all' : '[&>code]:break-words'
+ )}
language={tab.language}
wrapLines={true}
hideLineNumbers={tab.hideLineNumbers}