The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Moves the logout link and adds an icon, to help prevent accidental clicks
Terry Sutton46e1d66be33c
diff --git a/studio/components/layouts/AccountLayout/AccountLayout.tsx b/studio/components/layouts/AccountLayout/AccountLayout.tsxindex 98822e64257..dd57fa311fd 100644--- a/studio/components/layouts/AccountLayout/AccountLayout.tsx+++ b/studio/components/layouts/AccountLayout/AccountLayout.tsx@@ -83,7 +83,6 @@ const AccountLayout = ({ children, title, breadcrumbs }: any) => {href: `/account/tokens`,key: `/account/tokens`,},- logoutLink,],},]@@ -107,6 +106,9 @@ const AccountLayout = ({ children, title, breadcrumbs }: any) => {},],},+ {+ links: [logoutLink],+ },]if (!organizationsLinks?.length)linksWithHeaders = linksWithHeaders.filter((x: any) => x.heading != 'Organizations')diff --git a/studio/components/layouts/AccountLayout/WithSidebar.tsx b/studio/components/layouts/AccountLayout/WithSidebar.tsxindex 8ac03d40866..4b30bd47054 100644--- a/studio/components/layouts/AccountLayout/WithSidebar.tsx+++ b/studio/components/layouts/AccountLayout/WithSidebar.tsx@@ -1,7 +1,7 @@import Link from 'next/link'import { FC, ReactNode } from 'react'import { isUndefined } from 'lodash'-import { Menu, Typography, IconArrowUpRight, Badge } from '@supabase/ui'+import { Menu, Typography, IconArrowUpRight, Badge, IconLogOut } from '@supabase/ui'import { useFlag } from 'hooks'import LayoutHeader from '../ProjectLayout/LayoutHeader'@@ -88,7 +88,7 @@ export default WithSidebarconst LinksWithHeaders: FC<any> = ({ links, subitems, subitemsParentKey }) => {return links.map((x: any) => (<div key={x.heading} className="dark:border-dark border-b py-5 px-6">- <Menu.Group title={x.heading} />+ {x.heading && <Menu.Group title={x.heading} />}{x.versionLabel && (<div className="mb-1 px-3"><Badge color="yellow">{x.versionLabel}</Badge>@@ -147,6 +147,15 @@ const LinksWithoutHeaders: FC<any> = ({ links, subitems, subitemsParentKey }) =>const SidebarItem: FC<any> = ({ id, label, href, isActive, isSubitem, onClick, external }) => {if (isUndefined(href)) {+ let icon+ if (external) {+ icon = <IconArrowUpRight size={'tiny'} />+ }++ if (label === 'Logout') {+ icon = <IconLogOut size={'tiny'} />+ }+return (<Menu.Itemrounded@@ -156,7 +165,7 @@ const SidebarItem: FC<any> = ({ id, label, href, isActive, isSubitem, onClick, e}}active={isActive ? true : false}onClick={onClick || (() => {})}- icon={external && <IconArrowUpRight size={'tiny'} />}+ icon={icon}>{isSubitem ? <p className="text-sm">{label}</p> : label}</Menu.Item>