The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix project wild card route not parsing query param properly (#18268)
Joshen Lim6d192a1f612b
diff --git a/studio/pages/project/_/[[...routeSlug]].tsx b/studio/pages/project/_/[[...routeSlug]].tsxindex b0b7751b896..3be69c1a8a2 100644--- a/studio/pages/project/_/[[...routeSlug]].tsx+++ b/studio/pages/project/_/[[...routeSlug]].tsx@@ -33,29 +33,21 @@ const Header = () => {const GenericProjectPage: NextPage = () => {const router = useRouter()const { routeSlug, ...queryParams } = router.query- const queryString =- Object.keys(queryParams).length > 0- ? new URLSearchParams(queryParams as Record<string, string>).toString()- : ''++ const query = Object.keys(queryParams).length+ ? `?${new URLSearchParams(queryParams as Record<string, string>)}`+ : undefinedconst urlRewriterFactory = (slug: string | string[] | undefined) => {return (projectRef: string) => {- const hash = location.hash+ const hash = location.hash ? `#${location.hash}` : undefinedif (!Array.isArray(slug)) {- return [`/project/${projectRef}`, queryString ?? `?${queryString}`, hash ?? `#${hash}`]- .filter(Boolean)- .join('')+ return [`/project/${projectRef}`, query, hash].filter(Boolean).join('')}const slugPath = slug.reduce((a, b) => `${a}/${b}`, '').slice(1)- return [- `/project/${projectRef}/${slugPath}`,- queryString ?? `?${queryString}`,- hash ?? `#${hash}`,- ]- .filter(Boolean)- .join('')+ return [`/project/${projectRef}/${slugPath}`, query, hash].filter(Boolean).join('')}}