mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Context We've been seeing many `NotFoundError: Failed to execute 'removeChild' on 'Node'` and `NotFoundError: Failed to execute 'insertBefore' on 'Node'` events on Sentry which are historically known to be caused by Google Translate in the browser. There's technically no _right way_ to address this unfortunately, but one of the solutions which should address most of these issues is to wrap any dynamic text within a span - we've considered that quite a while back tbh but never took the time to do this until today with the help of Claude. Although just a heads up that it might not necessarily completely eradicate those issues. Also added an eslint rule which should prevent future occurences of this <img width="1264" height="192" alt="image" src="https://github.com/user-attachments/assets/b2c32ea0-45a2-4ccd-82fe-1a859905fc29" />
68 lines
1.9 KiB
TypeScript
68 lines
1.9 KiB
TypeScript
import { Skeleton } from 'ui'
|
|
import { Admonition } from 'ui-patterns/Admonition'
|
|
|
|
import { OrganizationCard } from './OrganizationCard'
|
|
import { useOrganizationsQuery } from '@/data/organizations/organizations-query'
|
|
|
|
export const OrgNotFound = ({ slug }: { slug?: string }) => {
|
|
const {
|
|
data: organizations,
|
|
isSuccess: isOrganizationsSuccess,
|
|
isPending: isOrganizationsLoading,
|
|
isError: isOrganizationsError,
|
|
error: organizationsError,
|
|
} = useOrganizationsQuery()
|
|
|
|
return (
|
|
<>
|
|
{slug !== '_' && (
|
|
<Admonition
|
|
type="destructive"
|
|
title="Organization not found"
|
|
description={
|
|
<>
|
|
{slug ? (
|
|
<>
|
|
The organization <code>{slug}</code>{' '}
|
|
</>
|
|
) : (
|
|
<>This organization </>
|
|
)}
|
|
<span>
|
|
does not exist or you do not have permission to access it. Contact the owner if you
|
|
believe this is a mistake.
|
|
</span>
|
|
</>
|
|
}
|
|
/>
|
|
)}
|
|
|
|
<h3 className="text-sm">Select a different organization to create your new project in</h3>
|
|
|
|
<div className="grid gap-2 grid-cols-2">
|
|
{isOrganizationsLoading && (
|
|
<>
|
|
<Skeleton className="h-[62px] rounded-md" />
|
|
<Skeleton className="h-[62px] rounded-md" />
|
|
<Skeleton className="h-[62px] rounded-md" />
|
|
</>
|
|
)}
|
|
{isOrganizationsError && (
|
|
<Admonition
|
|
type="destructive"
|
|
title="Failed to load organizations"
|
|
description={organizationsError?.message}
|
|
/>
|
|
)}
|
|
{isOrganizationsSuccess && (
|
|
<>
|
|
{organizations?.map((org) => (
|
|
<OrganizationCard key={org.slug} organization={org} href={`/new/${org.slug}`} />
|
|
))}
|
|
</>
|
|
)}
|
|
</div>
|
|
</>
|
|
)
|
|
}
|