The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore(studio): refactor oauth apps page and table (#43366)
Danny White503c01b5bca9
diff --git a/apps/docs/content/guides/auth/oauth-server/getting-started.mdx b/apps/docs/content/guides/auth/oauth-server/getting-started.mdxindex b65a671d198..0efdc4068e2 100644--- a/apps/docs/content/guides/auth/oauth-server/getting-started.mdx+++ b/apps/docs/content/guides/auth/oauth-server/getting-started.mdx@@ -495,11 +495,11 @@ Store the client secret securely. It will only be shown once. If you lose it, yoWhen a client exchanges an authorization code or refreshes a token, it must authenticate with the token endpoint. The `token_endpoint_auth_method` controls how this authentication happens:-| Method | Description | Used by |-| --- | --- | --- |-| `none` | No client authentication. Only `client_id` is sent in the request body. | Public clients (required) |-| `client_secret_basic` | Client credentials sent via HTTP Basic auth (`Authorization: Basic <base64(client_id:client_secret)>`). **This is the default for confidential clients.** | Confidential clients |-| `client_secret_post` | Client credentials sent in the request body (`client_id` and `client_secret` as form parameters). | Confidential clients |+| Method | Description | Used by |+| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |+| `none` | No client authentication. Only `client_id` is sent in the request body. | Public clients (required) |+| `client_secret_basic` | Client credentials sent via HTTP Basic auth (`Authorization: Basic <base64(client_id:client_secret)>`). **This is the default for confidential clients.** | Confidential clients |+| `client_secret_post` | Client credentials sent in the request body (`client_id` and `client_secret` as form parameters). | Confidential clients |**Defaults:** Public clients default to `none`. Confidential clients default to `client_secret_basic` (per [RFC 7591](https://datatracker.ietf.org/doc/html/rfc7591#section-2)).diff --git a/apps/docs/content/guides/self-hosting/self-hosted-functions.mdx b/apps/docs/content/guides/self-hosting/self-hosted-functions.mdxindex f8707dc48ac..02eaefaa097 100644--- a/apps/docs/content/guides/self-hosting/self-hosted-functions.mdx+++ b/apps/docs/content/guides/self-hosting/self-hosted-functions.mdx@@ -125,14 +125,14 @@ const customVar = Deno.env.get('MY_CUSTOM_VAR')The functions service is pre-configured with the following environment variables:-| Variable | Value | Purpose |-| --- | --- | --- |-| `SUPABASE_URL` | `http://kong:8000` | Internal API gateway URL |-| `SUPABASE_PUBLIC_URL` | `http://<your-domain>:8000` | Base URL for accessing Supabase from the Internet |-| `JWT_SECRET` | Your secret key | Legacy symmetric encryption key used to sign and verify JWTs |-| `SUPABASE_ANON_KEY` | Your anon key | Client-side API key with limited permissions (`anon` role). |-| `SUPABASE_SERVICE_ROLE_KEY` | Your service role key | Server-side API key with full database access (`service_role` role) |-| `SUPABASE_DB_URL` | Postgres connection string | Can be used for direct database access |+| Variable | Value | Purpose |+| --------------------------- | --------------------------- | ------------------------------------------------------------------- |+| `SUPABASE_URL` | `http://kong:8000` | Internal API gateway URL |+| `SUPABASE_PUBLIC_URL` | `http://<your-domain>:8000` | Base URL for accessing Supabase from the Internet |+| `JWT_SECRET` | Your secret key | Legacy symmetric encryption key used to sign and verify JWTs |+| `SUPABASE_ANON_KEY` | Your anon key | Client-side API key with limited permissions (`anon` role). |+| `SUPABASE_SERVICE_ROLE_KEY` | Your service role key | Server-side API key with full database access (`service_role` role) |+| `SUPABASE_DB_URL` | Postgres connection string | Can be used for direct database access |Here's an example function that queries a table using `@supabase/supabase-js`:diff --git a/apps/studio/components/interfaces/Organization/OAuthApps/AuthorizedAppRow.tsx b/apps/studio/components/interfaces/Organization/OAuthApps/AuthorizedAppRow.tsxindex f09b319cd5d..52d6e954610 100644--- a/apps/studio/components/interfaces/Organization/OAuthApps/AuthorizedAppRow.tsx+++ b/apps/studio/components/interfaces/Organization/OAuthApps/AuthorizedAppRow.tsx@@ -1,9 +1,8 @@import { Trash } from 'lucide-react'-import Table from 'components/to-be-cleaned/Table'import CopyButton from 'components/ui/CopyButton'import type { AuthorizedApp } from 'data/oauth/authorized-apps-query'-import { Button } from 'ui'+import { Button, TableCell, TableRow } from 'ui'import { TimestampInfo } from 'ui-patterns'export interface AuthorizedAppRowProps {@@ -13,35 +12,39 @@ export interface AuthorizedAppRowProps {export const AuthorizedAppRow = ({ app, onSelectRevoke }: AuthorizedAppRowProps) => {return (- <Table.tr>- <Table.td>+ <TableRow>+ <TableCell className="w-[62px] min-w-[62px] max-w-[62px]"><div- className="w-[30px] h-[30px] rounded-full bg-no-repeat bg-cover bg-center border border-control flex items-center justify-center"+ className="w-[30px] h-[30px] rounded-full bg-no-repeat bg-cover bg-center border border-control flex items-center justify-center text-xs"style={{ backgroundImage: app.icon ? `url('${app.icon}')` : 'none' }}>{!!app.icon ? '' : `${app.name[0]}`}</div>- </Table.td>- <Table.td>{app.name}</Table.td>- <Table.td>{app.created_by}</Table.td>- <Table.td>+ </TableCell>+ <TableCell>+ <p className="truncate" title={app.name}>+ {app.name}+ </p>+ </TableCell>+ <TableCell>{app.created_by}</TableCell>+ <TableCell><div className="flex items-center gap-x-2">- <p className="font-mono truncate" title={app.app_id}>+ <p className="text-xs font-mono truncate" title={app.app_id}>{app.app_id}</p><CopyButton iconOnly type="default" text={app.app_id} className="px-1" /></div>- </Table.td>- <Table.td>+ </TableCell>+ <TableCell><TimestampInfoutcTimestamp={app.authorized_at ?? ''}labelFormat="DD/MM/YYYY, HH:mm:ss"className="text-sm"/>- </Table.td>- <Table.td align="right">+ </TableCell>+ <TableCell className="text-right"><Button type="default" icon={<Trash />} className="px-1" onClick={() => onSelectRevoke()} />- </Table.td>- </Table.tr>+ </TableCell>+ </TableRow>)}diff --git a/apps/studio/components/interfaces/Organization/OAuthApps/OAuthAppRow.tsx b/apps/studio/components/interfaces/Organization/OAuthApps/OAuthAppRow.tsxindex 83d34da16d6..fe26aca5234 100644--- a/apps/studio/components/interfaces/Organization/OAuthApps/OAuthAppRow.tsx+++ b/apps/studio/components/interfaces/Organization/OAuthApps/OAuthAppRow.tsx@@ -1,7 +1,6 @@import { PermissionAction } from '@supabase/shared-types/out/constants'import { Edit, MoreVertical, Trash } from 'lucide-react'-import Table from 'components/to-be-cleaned/Table'import CopyButton from 'components/ui/CopyButton'import type { OAuthApp } from 'data/oauth/oauth-apps-query'import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'@@ -12,6 +11,8 @@ import {DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,+ TableCell,+ TableRow,Tooltip,TooltipContent,TooltipTrigger,@@ -35,36 +36,36 @@ export const OAuthAppRow = ({ app, onSelectEdit, onSelectDelete }: OAuthAppRowPr)return (- <Table.tr>- <Table.td>+ <TableRow>+ <TableCell className="w-[62px] min-w-[62px] max-w-[62px]"><div- className="w-[30px] h-[30px] rounded-full bg-no-repeat bg-cover bg-center border border-control flex items-center justify-center"+ className="w-[30px] h-[30px] rounded-full bg-no-repeat bg-cover bg-center border border-control flex items-center justify-center text-xs"style={{ backgroundImage: app.icon ? `url('${app.icon}')` : 'none' }}>{!!app.icon ? '' : `${app.name[0]}`}</div>- </Table.td>- <Table.td>+ </TableCell>+ <TableCell><p title={app.name} className="truncate">{app.name}</p>- </Table.td>- <Table.td>+ </TableCell>+ <TableCell><div className="flex items-center gap-x-2">- <p className="font-mono truncate" title={app.client_id}>+ <p className="text-xs font-mono truncate" title={app.client_id}>{app.client_id}</p><CopyButton type="default" iconOnly text={app.client_id ?? ''} className="px-1" /></div>- </Table.td>- <Table.td>+ </TableCell>+ <TableCell><TimestampInfoutcTimestamp={app.created_at ?? ''}labelFormat="DD/MM/YYYY, HH:mm:ss"className="text-sm"/>- </Table.td>- <Table.td align="right">+ </TableCell>+ <TableCell className="text-right"><DropdownMenu><DropdownMenuTrigger asChild><Button type="default" icon={<MoreVertical />} className="px-1" />@@ -113,7 +114,7 @@ export const OAuthAppRow = ({ app, onSelectEdit, onSelectDelete }: OAuthAppRowPr</Tooltip></DropdownMenuContent></DropdownMenu>- </Table.td>- </Table.tr>+ </TableCell>+ </TableRow>)}diff --git a/apps/studio/components/interfaces/Organization/OAuthApps/OAuthApps.tsx b/apps/studio/components/interfaces/Organization/OAuthApps/OAuthApps.tsxindex c340127cf3c..1718168386a 100644--- a/apps/studio/components/interfaces/Organization/OAuthApps/OAuthApps.tsx+++ b/apps/studio/components/interfaces/Organization/OAuthApps/OAuthApps.tsx@@ -1,10 +1,5 @@import { PermissionAction } from '@supabase/shared-types/out/constants'-import { Check, X } from 'lucide-react'-import { useState } from 'react'-import { useParams } from 'common'-import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'-import Table from 'components/to-be-cleaned/Table'import AlertError from 'components/ui/AlertError'import { ButtonTooltip } from 'components/ui/ButtonTooltip'import CopyButton from 'components/ui/CopyButton'@@ -13,8 +8,32 @@ import { AuthorizedApp, useAuthorizedAppsQuery } from 'data/oauth/authorized-appimport { OAuthAppCreateResponse } from 'data/oauth/oauth-app-create-mutation'import { OAuthApp, useOAuthAppsQuery } from 'data/oauth/oauth-apps-query'import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'-import { Button, cn } from 'ui'+import { Check, X } from 'lucide-react'+import { useMemo, useState } from 'react'+import {+ Button,+ Card,+ cn,+ Table,+ TableBody,+ TableCell,+ TableHead,+ TableHeader,+ TableHeadSort,+ TableRow,+} from 'ui'+import { PageContainer } from 'ui-patterns/PageContainer'+import {+ PageSection,+ PageSectionAside,+ PageSectionContent,+ PageSectionDescription,+ PageSectionMeta,+ PageSectionSummary,+ PageSectionTitle,+} from 'ui-patterns/PageSection'import { ShimmeringLoader } from 'ui-patterns/ShimmeringLoader'+import { AuthorizedAppRow } from './AuthorizedAppRow'import { DeleteAppModal } from './DeleteAppModal'import { OAuthAppRow } from './OAuthAppRow'@@ -26,6 +45,29 @@ import { RevokeAppModal } from './RevokeAppModal'// to prevent any confusion (case study: GitHub). Authorized apps could be in the "integrations" tab, but let's// check in again after we wrap up Vercel integration+type SortOrder = 'asc' | 'desc'+type PublishedAppsSort = 'created:asc' | 'created:desc'+type PublishedAppsSortColumn = 'created'+type AuthorizedAppsSort = 'authorized:asc' | 'authorized:desc'+type AuthorizedAppsSortColumn = 'authorized'++const parseSort = <C extends string>(sort: string): [C, SortOrder] => {+ return sort.split(':') as [C, SortOrder]+}++const toggleSort = <S extends string>(+ currentSort: S,+ column: string,+ setSort: (sort: S) => void+) => {+ const [currentColumn, currentOrder] = parseSort(currentSort)+ if (currentColumn === column) {+ setSort(`${column}:${currentOrder === 'asc' ? 'desc' : 'asc'}` as S)+ } else {+ setSort(`${column}:asc` as S)+ }+}+export const OAuthApps = () => {const { slug } = useParams()const [showPublishModal, setShowPublishModal] = useState(false)@@ -33,6 +75,8 @@ export const OAuthApps = () => {const [selectedAppToUpdate, setSelectedAppToUpdate] = useState<OAuthApp>()const [selectedAppToDelete, setSelectedAppToDelete] = useState<OAuthApp>()const [selectedAppToRevoke, setSelectedAppToRevoke] = useState<AuthorizedApp>()+ const [publishedAppsSort, setPublishedAppsSort] = useState<PublishedAppsSort>('created:asc')+ const [authorizedAppsSort, setAuthorizedAppsSort] = useState<AuthorizedAppsSort>('authorized:asc')const { can: canReadOAuthApps, isLoading: isLoadingPermissions } = useAsyncCheckPermissions(PermissionAction.READ,@@ -51,9 +95,21 @@ export const OAuthApps = () => {isError: isErrorPublishedApps,} = useOAuthAppsQuery({ slug }, { enabled: canReadOAuthApps })- const sortedPublishedApps = publishedApps?.sort((a, b) => {- return Number(new Date(a.created_at ?? '')) - Number(new Date(b.created_at ?? ''))- })+ const sortedPublishedApps = useMemo(() => {+ const [sortColumn, sortOrder] = parseSort<PublishedAppsSortColumn>(publishedAppsSort)+ const orderMultiplier = sortOrder === 'asc' ? 1 : -1++ return [...(publishedApps ?? [])].sort((a, b) => {+ if (sortColumn === 'created') {+ return (+ (new Date(a.created_at ?? '').getTime() - new Date(b.created_at ?? '').getTime()) *+ orderMultiplier+ )+ }++ return 0+ })+ }, [publishedApps, publishedAppsSort])const {data: authorizedApps,@@ -62,22 +118,47 @@ export const OAuthApps = () => {isError: isErrorAuthorizedApps,} = useAuthorizedAppsQuery({ slug })- const sortedAuthorizedApps = authorizedApps?.sort((a, b) => {- return Number(new Date(a.authorized_at)) - Number(new Date(b.authorized_at))- })+ const sortedAuthorizedApps = useMemo(() => {+ const [sortColumn, sortOrder] = parseSort<AuthorizedAppsSortColumn>(authorizedAppsSort)+ const orderMultiplier = sortOrder === 'asc' ? 1 : -1++ return [...(authorizedApps ?? [])].sort((a, b) => {+ if (sortColumn === 'authorized') {+ return (+ (new Date(a.authorized_at).getTime() - new Date(b.authorized_at).getTime()) *+ orderMultiplier+ )+ }++ return 0+ })+ }, [authorizedApps, authorizedAppsSort])++ const hasPublishedApps = (publishedApps?.length ?? 0) > 0+ const hasAuthorizedApps = (authorizedApps?.length ?? 0) > 0+ const avatarHeadClass = 'w-[62px] min-w-[62px] max-w-[62px]'+ const avatarHeadCollapsedClass = 'w-0 min-w-0 max-w-0 p-0'++ const handlePublishedSortChange = (column: PublishedAppsSortColumn) => {+ toggleSort(publishedAppsSort, column, setPublishedAppsSort)+ }++ const handleAuthorizedSortChange = (column: AuthorizedAppsSortColumn) => {+ toggleSort(authorizedAppsSort, column, setAuthorizedAppsSort)+ }return (<>- <ScaffoldContainer className="px-6 xl:px-10">- <ScaffoldSection isFullWidth className="flex flex-col gap-y-8">- <div className="space-y-4">- <div className="flex flex-col md:flex-row items-start md:items-center justify-between gap-2">- <div>- <p>Published Apps</p>- <p className="text-foreground-light text-sm">- Build integrations that extend Supabase's functionality- </p>- </div>+ <PageContainer size="default" className="pb-16">+ <PageSection id="published-apps" className="pt-12">+ <PageSectionMeta>+ <PageSectionSummary>+ <PageSectionTitle>Published apps</PageSectionTitle>+ <PageSectionDescription>+ Build integrations that extend Supabase's functionality+ </PageSectionDescription>+ </PageSectionSummary>+ <PageSectionAside><ButtonTooltipdisabled={!canCreateOAuthApps}type="primary"@@ -91,10 +172,11 @@ export const OAuthApps = () => {},}}>- Add application+ Publish OAuth app</ButtonTooltip>- </div>-+ </PageSectionAside>+ </PageSectionMeta>+ <PageSectionContent className="space-y-4">{isLoadingPublishedApps || isLoadingPermissions ? (<div className="space-y-2"><ShimmeringLoader />@@ -157,21 +239,46 @@ export const OAuthApps = () => {)}{isSuccessPublishedApps && (- <>- {(publishedApps?.length ?? 0) === 0 ? (- <div className="bg-surface-100 border rounded p-4 flex items-center justify-between mt-4">- <p className="prose text-sm">You do not have any published applications yet</p>- </div>- ) : (- <Table- head={[- <Table.th key="icon" className="w-[30px]"></Table.th>,- <Table.th key="name">Name</Table.th>,- <Table.th key="client-id">Client ID</Table.th>,- <Table.th key="created-at">Created at</Table.th>,- <Table.th key="delete-action"></Table.th>,- ]}- body={+ <Card>+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead+ className={cn(+ hasPublishedApps ? avatarHeadClass : avatarHeadCollapsedClass,+ !hasPublishedApps && 'text-foreground-muted'+ )}+ >+ <span className="sr-only">Avatar</span>+ </TableHead>+ <TableHead className={cn(!hasPublishedApps && 'text-foreground-muted')}>+ Name+ </TableHead>+ <TableHead className={cn(!hasPublishedApps && 'text-foreground-muted')}>+ Client ID+ </TableHead>+ <TableHead className={cn(!hasPublishedApps && 'text-foreground-muted')}>+ {hasPublishedApps ? (+ <TableHeadSort+ column="created"+ currentSort={publishedAppsSort}+ onSortChange={handlePublishedSortChange}+ >+ CREATED+ </TableHeadSort>+ ) : (+ 'CREATED'+ )}+ </TableHead>+ <TableHead+ className={cn('text-right', !hasPublishedApps && 'text-foreground-muted')}+ >+ <span className="sr-only">Actions</span>+ </TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {hasPublishedApps ? (sortedPublishedApps?.map((app) => (<OAuthAppRowkey={app.id}@@ -182,69 +289,114 @@ export const OAuthApps = () => {}}onSelectDelete={() => setSelectedAppToDelete(app)}/>- )) ?? []- }- />- )}- </>+ ))+ ) : (+ <TableRow className="[&>td]:hover:bg-inherit">+ <TableCell colSpan={5}>+ <p className="text-sm text-foreground">No results found</p>+ <p className="text-sm text-foreground-lighter">+ You do not have any published applications yet+ </p>+ </TableCell>+ </TableRow>+ )}+ </TableBody>+ </Table>+ </Card>)}- </div>+ </PageSectionContent>+ </PageSection>- <div>- <p>Authorized Apps</p>- <p className="text-foreground-light text-sm">- Applications that have access to your organization's settings and projects- </p>-- <div className="mt-4">- {isLoadingAuthorizedApps || isLoadingPermissions ? (- <div className="space-y-2">- <ShimmeringLoader />- <ShimmeringLoader className="w-3/4" />- <ShimmeringLoader className="w-1/2" />- </div>- ) : !canReadOAuthApps ? (- <NoPermission resourceText="view authorized apps" />- ) : null}+ <PageSection id="authorized-apps">+ <PageSectionMeta>+ <PageSectionSummary>+ <PageSectionTitle>Authorized apps</PageSectionTitle>+ <PageSectionDescription>+ Applications that have access to your organization's settings and projects+ </PageSectionDescription>+ </PageSectionSummary>+ </PageSectionMeta>+ <PageSectionContent className="space-y-4">+ {isLoadingAuthorizedApps || isLoadingPermissions ? (+ <div className="space-y-2">+ <ShimmeringLoader />+ <ShimmeringLoader className="w-3/4" />+ <ShimmeringLoader className="w-1/2" />+ </div>+ ) : !canReadOAuthApps ? (+ <NoPermission resourceText="view authorized apps" />+ ) : null}- {isErrorAuthorizedApps && <AlertError subject="Failed to retrieve authorized apps" />}+ {isErrorAuthorizedApps && <AlertError subject="Failed to retrieve authorized apps" />}- {isSuccessAuthorizedApps && (- <>- {(authorizedApps.length ?? 0) === 0 ? (- <div className="bg-surface-100 border rounded p-4 flex items-center justify-between">- <p className="prose text-sm">- You do not have any authorized applications yet- </p>- </div>- ) : (- <Table- className="mt-4"- head={[- <Table.th key="icon" className="w-[30px]"></Table.th>,- <Table.th key="name">Name</Table.th>,- <Table.th key="created-by">Created by</Table.th>,- <Table.th key="app-id">App ID</Table.th>,- <Table.th key="authorized-at">Authorized at</Table.th>,- <Table.th key="delete-action"></Table.th>,- ]}- body={- sortedAuthorizedApps?.map((app) => (- <AuthorizedAppRow- key={app.id}- app={app}- onSelectRevoke={() => setSelectedAppToRevoke(app)}- />- )) ?? []- }- />- )}- </>- )}- </div>- </div>- </ScaffoldSection>- </ScaffoldContainer>+ {isSuccessAuthorizedApps && (+ <Card>+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead+ className={cn(+ hasAuthorizedApps ? avatarHeadClass : avatarHeadCollapsedClass,+ !hasAuthorizedApps && 'text-foreground-muted'+ )}+ >+ <span className="sr-only">Avatar</span>+ </TableHead>+ <TableHead className={cn(!hasAuthorizedApps && 'text-foreground-muted')}>+ Name+ </TableHead>+ <TableHead className={cn(!hasAuthorizedApps && 'text-foreground-muted')}>+ Author+ </TableHead>+ <TableHead className={cn(!hasAuthorizedApps && 'text-foreground-muted')}>+ App ID+ </TableHead>+ <TableHead className={cn(!hasAuthorizedApps && 'text-foreground-muted')}>+ {hasAuthorizedApps ? (+ <TableHeadSort+ column="authorized"+ currentSort={authorizedAppsSort}+ onSortChange={handleAuthorizedSortChange}+ >+ AUTHORIZED+ </TableHeadSort>+ ) : (+ 'AUTHORIZED'+ )}+ </TableHead>+ <TableHead+ className={cn('text-right', !hasAuthorizedApps && 'text-foreground-muted')}+ >+ <span className="sr-only">Actions</span>+ </TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {hasAuthorizedApps ? (+ sortedAuthorizedApps?.map((app) => (+ <AuthorizedAppRow+ key={app.id}+ app={app}+ onSelectRevoke={() => setSelectedAppToRevoke(app)}+ />+ ))+ ) : (+ <TableRow className="[&>td]:hover:bg-inherit">+ <TableCell colSpan={6}>+ <p className="text-sm text-foreground">No results found</p>+ <p className="text-sm text-foreground-lighter">+ You do not have any authorized applications yet+ </p>+ </TableCell>+ </TableRow>+ )}+ </TableBody>+ </Table>+ </Card>+ )}+ </PageSectionContent>+ </PageSection>+ </PageContainer><PublishAppSidePanelvisible={showPublishModal}diff --git a/apps/studio/components/interfaces/Organization/OrganizationCard.tsx b/apps/studio/components/interfaces/Organization/OrganizationCard.tsxindex 14aff74cbf5..7ab07fa0413 100644--- a/apps/studio/components/interfaces/Organization/OrganizationCard.tsx+++ b/apps/studio/components/interfaces/Organization/OrganizationCard.tsx@@ -41,7 +41,7 @@ export const OrganizationCard = ({<span>{organization.plan.name} Plan</span>{numProjects > 0 && (<>- <span>•</span>+ <span>·</span><span>{numProjects} project{numProjects > 1 ? 's' : ''}</span>