mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 07:09:07 +03:00
Reorder edge functions nav + clean up
This commit is contained in:
1 parent
d24513a1ac
commit
5283db12a3
3 files changed
+7
-21
No files matched your search
@@ -36,7 +36,7 @@ const EdgeFunctionsListItem = ({ function: item }: EdgeFunctionsListItemProps) =
|
||||
<Table.tr
|
||||
key={item.id}
|
||||
onClick={() => {
|
||||
router.push(`/project/${ref}/functions/${item.slug}/details`)
|
||||
router.push(`/project/${ref}/functions/${item.slug}`)
|
||||
}}
|
||||
>
|
||||
<Table.td>
|
||||
|
||||
@@ -12,17 +12,17 @@ const FunctionsNav = ({ item }: any) => {
|
||||
type="underlined"
|
||||
size="medium"
|
||||
baseClassNames="!space-y-0"
|
||||
activeId={!activeRoute ? 'metrics' : activeRoute}
|
||||
activeId={!activeRoute ? 'overview' : activeRoute}
|
||||
onChange={(e: string) => {
|
||||
if (item?.slug) {
|
||||
router.push(`/project/${ref}/functions/${item.slug}/${e === 'metrics' ? '' : e}`)
|
||||
router.push(`/project/${ref}/functions/${item.slug}/${e === 'overview' ? '' : e}`)
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Tabs.Panel id="details" label="Details" />
|
||||
<Tabs.Panel id="metrics" label="Metrics" />
|
||||
<Tabs.Panel id="overview" label="Overview" />
|
||||
<Tabs.Panel id="invocations" label="Invocations" />
|
||||
<Tabs.Panel id="logs" label="Logs" />
|
||||
<Tabs.Panel id="details" label="Details" />
|
||||
</Tabs>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,16 +1,5 @@
|
||||
import { useParams } from 'common'
|
||||
import { useState } from 'react'
|
||||
import {
|
||||
Button,
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogSection,
|
||||
DialogSectionSeparator,
|
||||
DialogTrigger,
|
||||
Modal,
|
||||
} from 'ui'
|
||||
import { Button, Dialog, DialogContent, DialogSection, DialogTrigger } from 'ui'
|
||||
|
||||
import {
|
||||
EdgeFunctionsListItem,
|
||||
@@ -26,7 +15,6 @@ import type { NextPageWithLayout } from 'types'
|
||||
|
||||
const PageLayout: NextPageWithLayout = () => {
|
||||
const { ref } = useParams()
|
||||
const [showTerminalInstructions, setShowTerminalInstructions] = useState(false)
|
||||
|
||||
const {
|
||||
data: functions,
|
||||
@@ -55,9 +43,7 @@ const PageLayout: NextPageWithLayout = () => {
|
||||
} deployed`}</span>
|
||||
<Dialog>
|
||||
<DialogTrigger asChild>
|
||||
<Button type="primary" onClick={() => setShowTerminalInstructions(true)}>
|
||||
Deploy a new function
|
||||
</Button>
|
||||
<Button type="primary">Deploy a new function</Button>
|
||||
</DialogTrigger>
|
||||
<DialogContent size={'large'}>
|
||||
<DialogSection padding="small">
|
||||
|
||||
Reference in new issue
Block a user