Skip to content

Commit 3a23ebd

Browse files
authored
Fix edge functions headers span (supabase#36525)
1 parent 327cab0 commit 3a23ebd

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecrets.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ const EdgeFunctionSecrets = () => {
4242
[]
4343
: data ?? []
4444

45+
const headers = [
46+
<Table.th key="secret-name">Name</Table.th>,
47+
<Table.th key="secret-value" className="flex items-center gap-x-2">
48+
Digest{' '}
49+
<Badge color="scale" className="font-mono">
50+
SHA256
51+
</Badge>
52+
</Table.th>,
53+
<Table.th key="secret-updated-at">Updated at</Table.th>,
54+
<Table.th key="actions" />,
55+
]
56+
4557
return (
4658
<>
4759
{isLoading && <GenericSkeletonLoader />}
@@ -73,17 +85,7 @@ const EdgeFunctionSecrets = () => {
7385

7486
<div className="w-full overflow-hidden overflow-x-auto">
7587
<Table
76-
head={[
77-
<Table.th key="secret-name">Name</Table.th>,
78-
<Table.th key="secret-value" className="flex items-center gap-x-2">
79-
Digest{' '}
80-
<Badge color="scale" className="font-mono">
81-
SHA256
82-
</Badge>
83-
</Table.th>,
84-
<Table.th key="secret-updated-at">Updated at</Table.th>,
85-
<Table.th key="actions" />,
86-
]}
88+
head={headers}
8789
body={
8890
secrets.length > 0 ? (
8991
secrets.map((secret) => (
@@ -95,7 +97,7 @@ const EdgeFunctionSecrets = () => {
9597
))
9698
) : secrets.length === 0 && searchString.length > 0 ? (
9799
<Table.tr>
98-
<Table.td colSpan={3}>
100+
<Table.td colSpan={headers.length}>
99101
<p className="text-sm text-foreground">No results found</p>
100102
<p className="text-sm text-foreground-light">
101103
Your search for "{searchString}" did not return any results
@@ -104,7 +106,7 @@ const EdgeFunctionSecrets = () => {
104106
</Table.tr>
105107
) : (
106108
<Table.tr>
107-
<Table.td colSpan={3}>
109+
<Table.td colSpan={headers.length}>
108110
<p className="text-sm text-foreground">No secrets created</p>
109111
<p className="text-sm text-foreground-light">
110112
There are no secrets associated with your project yet

0 commit comments

Comments
 (0)