The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
ref: Remove experts page and setup permanent redirects (#30693)
Kamil Ogórekf3c6e58755f9
diff --git a/apps/www/data/Footer.ts b/apps/www/data/Footer.tsindex 960c62865e6..088cb91b8a9 100644--- a/apps/www/data/Footer.ts+++ b/apps/www/data/Footer.ts@@ -57,10 +57,6 @@ const footerData = [text: 'Integrations',url: '/partners/integrations',},- {- text: 'Experts',- url: '/partners/experts',- },{text: 'Brand Assets / Logos',url: '/brand-assets',diff --git a/apps/www/lib/redirects.js b/apps/www/lib/redirects.jsindex 178f7945320..7fe17daad1e 100644--- a/apps/www/lib/redirects.js+++ b/apps/www/lib/redirects.js@@ -2834,6 +2834,16 @@ module.exports = [source: '/docs/guides/database/connecting-to-postgres/serverless-drivers',destination: '/docs/guides/database/connecting-to-postgres',},+ {+ permanent: true,+ source: '/partners/experts',+ destination: '/partners',+ },+ {+ permanent: true,+ source: '/partners/experts/:path*',+ destination: '/partners',+ },// marketingdiff --git a/apps/www/pages/partners/[slug].tsx b/apps/www/pages/partners/[slug].tsxindex f1ae62b2a49..60e532b0ab1 100644--- a/apps/www/pages/partners/[slug].tsx+++ b/apps/www/pages/partners/[slug].tsx@@ -36,26 +36,16 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {.eq('slug', params!.slug as string).single()- if (!partner || process.env.npm_lifecycle_event === 'build') {+ if (!partner || partner.type === 'expert' || process.env.npm_lifecycle_event === 'build') {return {notFound: true,}}- let redirectUrl: string- switch (partner.type) {- case 'technology':- redirectUrl = `/partners/integrations/${partner.slug}`- break- case 'expert':- redirectUrl = `/partners/experts/${partner.slug}`- break- }-return {redirect: {permanent: false,- destination: redirectUrl,+ destination: `/partners/integrations/${partner.slug}`,},}}diff --git a/apps/www/pages/partners/experts/[slug].tsx b/apps/www/pages/partners/experts/[slug].tsxdeleted file mode 100644index c8f3eb41644..00000000000--- a/apps/www/pages/partners/experts/[slug].tsx+++ /dev/null@@ -1,257 +0,0 @@-import { ChevronLeft, ExternalLink } from 'lucide-react'-import { GetStaticPaths, GetStaticProps } from 'next'-import { MDXRemote, MDXRemoteSerializeResult } from 'next-mdx-remote'-import { serialize } from 'next-mdx-remote/serialize'-import { NextSeo } from 'next-seo'-import Image from 'next/image'-import Link from 'next/link'-import 'swiper/css'-import { Swiper, SwiperSlide } from 'swiper/react'-import DefaultLayout from '~/components/Layouts/Default'-import SectionContainer from '~/components/Layouts/SectionContainer'-import supabase from '~/lib/supabaseMisc'-import type { Partner } from '~/types/partners'-import Error404 from '../../404'--function Partner({- partner,- overview,-}: {- partner: Partner- overview: MDXRemoteSerializeResult<Record<string, unknown>, Record<string, unknown>>-}) {- if (!partner) return <Error404 />- return (- <>- <NextSeo- title={`${partner.title} | Works With Supabase`}- description={partner.description}- openGraph={{- title: `${partner.title} | Works With Supabase`,- description: partner.description,- url: `https://supabase.com/partners/experts/${partner.slug}`,- images: [- {- url: partner.images ? partner.images[0] : partner.logo,- },- ],- }}- />-- <DefaultLayout>- <SectionContainer>- <div className="col-span-12 mx-auto mb-2 max-w-5xl space-y-12 lg:col-span-2">- {/* Back button */}- <Link- href="/partners/experts"- className="text-foreground hover:text-foreground-lighter flex cursor-pointer items-center transition-colors"- >- <ChevronLeft style={{ padding: 0 }} />- Back- </Link>-- <div className="flex items-center space-x-4">- <Image- layout="fixed"- width={56}- height={56}- className="bg-surface2100 flex-shrink-f0 h-14 w-14 rounded-full"- src={partner.logo}- alt={partner.title}- />- <h1 className="h1" style={{ marginBottom: 0 }}>- {partner.title}- </h1>- </div>-- <div- className="bg-surface-100 py-6"- style={{ marginLeft: 'calc(50% - 50vw)', marginRight: 'calc(50% - 50vw)' }}- >- <Swiper- initialSlide={0}- spaceBetween={0}- slidesPerView={4}- speed={300}- // slidesOffsetBefore={300}- centerInsufficientSlides={true}- breakpoints={{- 320: {- slidesPerView: 1,- },- 720: {- slidesPerView: 2,- },- 920: {- slidesPerView: 3,- },- 1024: {- slidesPerView: 4,- },- 1208: {- slidesPerView: 5,- },- }}- >- {partner.images?.map((image: any, i: number) => {- return (- <SwiperSlide key={i}>- <div className="relative ml-3 mr-3 block cursor-move overflow-hidden rounded-md">- <Image- layout="responsive"- objectFit="contain"- width={1460}- height={960}- src={image}- alt={partner.title}- />- </div>- </SwiperSlide>- )- })}- </Swiper>- </div>-- <div className="grid gap-3 space-y-16 lg:grid-cols-4 lg:space-y-0 lg:space-x-3">- <div className="lg:col-span-3">- <h2- className="text-foreground"- style={{ fontSize: '1.5rem', marginBottom: '1rem' }}- >- Overview- </h2>-- {partner.video && (- <div- className="bg-foreground-lighter relative w-full rounded-md shadow-lg"- style={{ padding: '56.25% 0 0 0', marginBottom: '1rem' }}- >- <iframe- title="Demo video showcasing Supabase"- className="absolute h-full w-full rounded-md"- src={`https://www.youtube-nocookie.com/embed/${partner.video}?autoplay=0&loop=0&controls=1&modestbranding=1&rel=0&disablekb=1`}- style={{ top: 0, left: 0 }}- frameBorder="0"- allow="autoplay; modestbranding; encrypted-media"- />- </div>- )}-- <div className="prose">- <MDXRemote {...overview} />- </div>- </div>-- <div>- <h2- className="text-foreground"- style={{ fontSize: '1.5rem', marginBottom: '1rem' }}- >- Details- </h2>-- <div className="text-foreground divide-y">- {partner.type === 'technology' && (- <div className="flex items-center justify-between py-2">- <span className="text-foreground-lighter">Developer</span>- <span className="text-foreground">{partner.developer}</span>- </div>- )}-- <div className="flex items-center justify-between py-2">- <span className="text-lighter">Category</span>- <Link- href={`/partners/experts#${partner.category.toLowerCase()}`}- className="text-brand hover:underline transition-colors"- >- {partner.category}- </Link>- </div>-- <div className="flex items-center justify-between py-2">- <span className="text-foreground-lighter">Website</span>- <a- href={partner.website}- target="_blank"- rel="noreferrer"- className="text-brand hover:underline transition-colors"- >- {new URL(partner.website).host}- </a>- </div>-- {partner.type === 'technology' && partner.docs && (- <div className="flex items-center justify-between py-2">- <span className="text-foreground-lighter">Documentation</span>- <a- href={partner.docs}- target="_blank"- rel="noreferrer"- className="text-brand hover:underline transition-colors"- >- <span className="flex items-center space-x-1">- <span>Learn</span>- <ExternalLink size="18" />- </span>- </a>- </div>- )}- </div>- </div>- </div>- </div>- </SectionContainer>- </DefaultLayout>- </>- )-}--// This function gets called at build time-export const getStaticPaths: GetStaticPaths = async () => {- const { data: slugs } = await supabase- .from('partners')- .select('slug')- .eq('approved', true)- .eq('type', 'expert')-- const paths: {- params: { slug: string }- locale?: string | undefined- }[] =- slugs?.map(({ slug }) => ({- params: {- slug,- },- })) ?? []-- return {- paths,- fallback: 'blocking',- }-}--// This also gets called at build time-export const getStaticProps: GetStaticProps = async ({ params }) => {- let { data: partner } = await supabase- .from('partners')- .select('*')- .eq('approved', true)- .eq('slug', params!.slug as string)- .single()-- if (!partner) {- return {- notFound: true,- }- }-- // Parse markdown- const overview = await serialize(partner.overview)-- return {- props: { partner, overview },- revalidate: 1800, // 30 minutes- }-}--export default Partnerdiff --git a/apps/www/pages/partners/experts/index.tsx b/apps/www/pages/partners/experts/index.tsxdeleted file mode 100644index 5dfb258fbd7..00000000000--- a/apps/www/pages/partners/experts/index.tsx+++ /dev/null@@ -1,117 +0,0 @@-import { NextSeo } from 'next-seo'-import { useRouter } from 'next/router'-import DefaultLayout from '~/components/Layouts/Default'-import SectionContainer from '~/components/Layouts/SectionContainer'-import PartnerLinkBox from '~/components/Partners/PartnerLinkBox'-import supabase from '~/lib/supabaseMisc'-import type { Partner } from '~/types/partners'-import TileGrid from '../../../components/Partners/TileGrid'--export async function getStaticProps() {- const { data: partners } = await supabase- .from('partners')- .select('*')- .eq('approved', true)- .eq('type', 'expert')- .order('category')- .order('title')-- return {- props: {- partners,- },- revalidate: 1800, // 30 minutes- }-}--interface Props {- partners: Partner[]-}--function ExpertPartnersPage(props: Props) {- const partners = props.partners ?? []- const router = useRouter()-- const meta_title = 'Find an expert'- const meta_description = `Find an expert to help build your next idea.`-- return (- <>- <NextSeo- title={meta_title}- description={meta_description}- openGraph={{- title: meta_title,- description: meta_description,- url: `https://supabase.com/partners/experts`,- images: [- {- url: `https://supabase.com${router.basePath}/images/product/database/database-og.jpg`, // TODO- },- ],- }}- />- <DefaultLayout className="bg-alternative">- <SectionContainer className="space-y-12">- <div>- <h1 className="h1">{meta_title}</h1>- <p className="text-foreground-lighter text-xl">{meta_description}</p>- </div>- <div className="grid space-y-12 md:gap-8 lg:grid-cols-12 lg:gap-16 lg:space-y-0 xl:gap-16">- <div className="lg:col-span-4 xl:col-span-3">- {/* Horizontal link menu */}- <div className="space-y-6">- {/* Search Bar */}- <div className="space-y-4">- <div className="text-foreground-light mb-2 text-sm">Explore more</div>- <div className="grid grid-cols-2 gap-4 lg:grid-cols-1">- <PartnerLinkBox- title="Integrations"- color="blue"- description="Extend and automate your workflow by using integrations for your favorite tools."- href={`/partners/integrations`}- icon={- <svg- xmlns="http://www.w3.org/2000/svg"- className="h-6 w-6"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- strokeWidth="1"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- d="M11 4a2 2 0 114 0v1a1 1 0 001 1h3a1 1 0 011 1v3a1 1 0 01-1 1h-1a2 2 0 100 4h1a1 1 0 011 1v3a1 1 0 01-1 1h-3a1 1 0 01-1-1v-1a2 2 0 10-4 0v1a1 1 0 01-1 1H7a1 1 0 01-1-1v-3a1 1 0 00-1-1H4a2 2 0 110-4h1a1 1 0 001-1V7a1 1 0 011-1h3a1 1 0 001-1V4z"- />- </svg>- }- />- </div>- </div>- </div>- </div>- <div className="lg:col-span-8 xl:col-span-9">- <div className="pb-8 mb-8 border-b">- <p className="text-foreground-lighter text-sm bg-surface-100 w-full rounded border p-4 shadow">- We are no longer accepting applications for new experts at the moment.- </p>- </div>-- {/* Partner Tiles */}- <div className="grid">- {partners.length ? (- <TileGrid partners={partners} hideCategories={true} />- ) : (- <p className="h2">No Partners Found</p>- )}- </div>- </div>- </div>- </SectionContainer>- </DefaultLayout>- </>- )-}--export default ExpertPartnersPagediff --git a/apps/www/pages/partners/index.tsx b/apps/www/pages/partners/index.tsxindex 9dc842d1c90..56be04814df 100644--- a/apps/www/pages/partners/index.tsx+++ b/apps/www/pages/partners/index.tsx@@ -97,12 +97,12 @@ const Partners = () => {<div className="absolute inset-0 z-[1] bg-[linear-gradient(to_top,hsl(var(--background-alternative-default))_40%,hsl(var(--background-default))_90%)]" /></div><SectionContainer>- <div className="grid grid-cols-1 lg:grid-cols-5 gap-8 lg:gap-4">- <div className="col-span-1 lg:col-span-2">+ <div className="grid grid-cols-1 md:grid-cols-4 gap-8">+ <div className="col-span-1 md:col-span-2"><h2 className="text-2xl sm:text-3xl xl:text-4xl tracking-[-.5px]">Explore our marketplace</h2>- <p className="text-foreground-lighter text-xs sm:text-sm lg:text-base py-3 lg:max-w-md">+ <p className="text-foreground-lighter text-sm sm:text-sm md:text-base py-3 md:max-w-md">Discover how technology and consulting partners are already working with Supabase.</p><TextLink@@ -110,38 +110,7 @@ const Partners = () => {label="View docs"/></div>- <div className="col-span-1 lg:col-span-3 w-full max-w-4xl grid gap-8 rounded md:grid-cols-2">- <Panel- hasShimmer- hasActiveOnHover- innerClassName="px-8 py-6 group flex flex-col gap-4"- >- <div className="bg-surface-200 mb-4 text-foreground flex h-12 w-12 items-center justify-center rounded-md border transition-all group-hover:scale-105">- <svg- xmlns="http://www.w3.org/2000/svg"- className="h-6 w-6"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- strokeWidth="1"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"- />- </svg>- </div>-- <div>- <h3 className="text-foreground text-lg">Experts</h3>- <p className="text-foreground-lighter text-sm">- Find an expert to help build your next idea.- </p>- </div>-- <Link href="/partners/experts" className="absolute inset-0" />- </Panel>+ <div className="col-span-1 md:col-span-2 w-full max-w-4xl grid gap-8 rounded"><PanelhasInnerShimmer={false}hasActiveOnHover={true}diff --git a/apps/www/pages/partners/integrations/[slug].tsx b/apps/www/pages/partners/integrations/[slug].tsxindex a65f36eda86..4305346dc30 100644--- a/apps/www/pages/partners/integrations/[slug].tsx+++ b/apps/www/pages/partners/integrations/[slug].tsx@@ -326,7 +326,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {.eq('slug', params!.slug as string).single()- if (!partner) {+ if (!partner || partner.type === 'expert') {return {notFound: true,}diff --git a/apps/www/pages/partners/integrations/index.tsx b/apps/www/pages/partners/integrations/index.tsxindex 0682d88ede6..1cc9b5c59be 100644--- a/apps/www/pages/partners/integrations/index.tsx+++ b/apps/www/pages/partners/integrations/index.tsx@@ -148,29 +148,6 @@ function IntegrationPartnersPage(props: Props) {<div className="space-y-4"><div className="text-foreground-lighter mb-2 text-sm">Explore more</div><div className="grid grid-cols-2 gap-8 lg:grid-cols-1">- <PartnerLinkBox- title="Experts"- color="blue"- description="Explore our certified Supabase agency experts that build with Supabase"- href={`/partners/experts`}- icon={- <svg- xmlns="http://www.w3.org/2000/svg"- className="h-6 w-6"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- strokeWidth="1"- >- <path- strokeLinecap="round"- strokeLinejoin="round"- d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"- />- </svg>- }- />-<PartnerLinkBoxhref={`/partners/integrations#become-a-partner`}title="Become a partner"