Skip to content

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

fix(www): partner integration links (#45391)

Danny White3be3ebb0e768
diff --git a/apps/www/components/Partners/TileGrid.tsx b/apps/www/components/Partners/TileGrid.tsx
index 1954d492ceb..633fa5ccac4 100644
--- a/apps/www/components/Partners/TileGrid.tsx
+++ b/apps/www/components/Partners/TileGrid.tsx
@@ -27,7 +27,7 @@ export default function TileGrid({
<h2 className="h2">Featured</h2>
<div className="grid grid-cols-1 gap-5 lg:max-w-none lg:grid-cols-2 xl:grid-cols-3">
{featuredPartners?.map((p) => (
- <Link key={p.slug} href={`/partners/${p.slug}`}>
+ <Link key={p.slug} href={`/partners/integrations/${p.slug}`}>
<div
className="
bg-surface-100
@@ -70,7 +70,7 @@ export default function TileGrid({
{!hideCategories && <h2 className="h2">{category}</h2>}
<div className="grid grid-cols-1 gap-5 lg:max-w-none lg:grid-cols-2 xl:grid-cols-3">
{partnersByCategory[category].map((p) => (
- <Link key={p.slug} href={`/partners/${p.slug}`}>
+ <Link key={p.slug} href={`/partners/integrations/${p.slug}`}>
<div
className="
bg-surface-100
diff --git a/apps/www/pages/partners/[slug].tsx b/apps/www/pages/partners/[slug].tsx
index 60e532b0ab1..3a60bb910c2 100644
--- a/apps/www/pages/partners/[slug].tsx
+++ b/apps/www/pages/partners/[slug].tsx
@@ -3,31 +3,17 @@ import supabase from '~/lib/supabaseMisc'
import Error404 from '../404'
function PartnerPage() {
- // Should be redirected to ./experts/:slug or ./integrations/:slug
+ // Existing short partner URLs redirect to their current integration pages.
return <Error404 />
}
-// This function gets called at build time
export const getStaticPaths: GetStaticPaths = async () => {
- const { data: slugs } = await supabase.from('partners').select('slug')
-
- const paths: {
- params: { slug: string }
- locale?: string | undefined
- }[] =
- slugs?.map(({ slug }) => ({
- params: {
- slug,
- },
- })) ?? []
-
return {
- paths,
+ paths: [],
fallback: 'blocking',
}
}
-// This also gets called at build time
export const getStaticProps: GetStaticProps = async ({ params }) => {
let { data: partner } = await supabase
.from('partners')
@@ -36,7 +22,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
.eq('slug', params!.slug as string)
.single()
- if (!partner || partner.type === 'expert' || process.env.npm_lifecycle_event === 'build') {
+ if (!partner || partner.type === 'expert') {
return {
notFound: true,
}