Skip to content

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

Remove usage of id for projects or org where unnecessary (#27583)

Joshen Lim02b09e6232db
diff --git a/apps/studio/components/interfaces/Home/ProjectList/ProjectList.tsx b/apps/studio/components/interfaces/Home/ProjectList/ProjectList.tsx
index 1c4d4546a40..4667b6fe65c 100644
--- a/apps/studio/components/interfaces/Home/ProjectList/ProjectList.tsx
+++ b/apps/studio/components/interfaces/Home/ProjectList/ProjectList.tsx
@@ -71,7 +71,7 @@ const ProjectList = ({ search, rewriteHref }: ProjectListProps) => {
{organizations?.map((organization) => {
return (
<OrganizationProjects
- key={organization.id}
+ key={organization.slug}
organization={organization}
projects={projectsByOrg[organization.id]}
overdueInvoices={(allOverdueInvoices ?? []).filter(
@@ -163,7 +163,7 @@ const OrganizationProjects = ({
if (search.length > 0 && filteredProjects.length === 0) return null
return (
- <div className="space-y-3" key={organization.id}>
+ <div className="space-y-3" key={organization.slug}>
<div className="flex space-x-4 items-center">
<h4 className="text-lg flex items-center">{organization.name}</h4>
diff --git a/apps/studio/components/layouts/SettingsLayout/OrganizationSettingsMenu.tsx b/apps/studio/components/layouts/SettingsLayout/OrganizationSettingsMenu.tsx
index 702d31f9ee8..9dbf270d151 100644
--- a/apps/studio/components/layouts/SettingsLayout/OrganizationSettingsMenu.tsx
+++ b/apps/studio/components/layouts/SettingsLayout/OrganizationSettingsMenu.tsx
@@ -18,9 +18,6 @@ const OrganizationSettingsMenu = () => {
{ label: 'Legal Documents', pathname: `/org/[slug]/documents` },
]
- // const { data: allProjects } = useProjectsQuery()
- // const projects = allProjects?.filter((project) => project.organization_id === organization?.id)
-
return (
<div className="space-y-10">
<div className="space-y-2">
@@ -36,25 +33,6 @@ const OrganizationSettingsMenu = () => {
/>
))}
</div>
-
- {/* [Joshen] Hiding below until we figure out a better UX for consolidating settings on projects */}
- {/* <div className="space-y-2">
- <p className="text-sm font-medium">Projects</p>
- <Accordion_Shadcn_ type="single" collapsible className="w-full">
- {projects?.map((project) => (
- <ProjectSettingsMenuItem key={project.ref} project={project} />
- ))}
- </Accordion_Shadcn_>
- </div>
- <div>
- <Link href={`/new/${organization?.slug}`}>
- <a>
- <Button type="default" size="small">
- Create new project
- </Button>
- </a>
- </Link>
- </div> */}
</div>
)
}
diff --git a/apps/studio/pages/authorize.tsx b/apps/studio/pages/authorize.tsx
index 95b98c602cf..0f6573987ef 100644
--- a/apps/studio/pages/authorize.tsx
+++ b/apps/studio/pages/authorize.tsx
@@ -180,7 +180,7 @@ const APIAuthorizationPage: NextPageWithLayout = () => {
>
{(organizations ?? []).map((organization) => (
<Listbox.Option
- key={organization.id}
+ key={organization.slug}
label={organization.name}
value={organization.slug}
>