Skip to content

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

Add a featured section to the integrations page.

Ivan Vasilov84553c45173f
diff --git a/apps/www/components/Partners/TileGrid.tsx b/apps/www/components/Partners/TileGrid.tsx
index 236c3509a71..41b510dca63 100644
--- a/apps/www/components/Partners/TileGrid.tsx
+++ b/apps/www/components/Partners/TileGrid.tsx
@@ -3,35 +3,81 @@ import Link from 'next/link'
import { Partner } from '~/types/partners'
export default function TileGrid({
- partnersByCategory,
+ partners,
hideCategories = false,
}: {
- partnersByCategory: { [category: string]: Partner[] }
+ partners: Partner[]
hideCategories?: boolean
}) {
+ const partnersByCategory: { [category: string]: Partner[] } = {}
+ partners.forEach(
+ (p) => (partnersByCategory[p.category] = [...(partnersByCategory[p.category] ?? []), p])
+ )
+
+ const featuredPartners = partners.filter((p) => p.featured)
+
return (
<>
+ {featuredPartners.length > 0 ? (
+ <div key="featured" id="featured" className="space-y-8">
+ <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}`}>
+ <a>
+ <div
+ className="
+ bg-scale-100 dark:bg-scale-300
+ hover:bg-scale-200 hover:dark:bg-scale-400
+ group flex h-full w-full flex-col rounded border px-6
+ py-6 shadow
+ transition-all
+ hover:shadow-lg"
+ >
+ <div className="flex w-full space-x-6">
+ <div className="h-10 w-10 scale-100 transition-all group-hover:scale-110">
+ <Image
+ layout="fixed"
+ width={40}
+ height={40}
+ className="h-10 w-10 rounded-full bg-gray-300"
+ src={p.logo}
+ alt={p.title}
+ />
+ </div>
+ <div>
+ <h3 className="text-scale-1100 group-hover:text-scale-1200 mb-2 text-xl transition-colors">
+ {p.title}
+ </h3>
+ <p
+ className="text-scale-900 text-sm line-clamp-4 min-h-[80px]"
+ title={p.description}
+ >
+ {p.description}
+ </p>
+ </div>
+ </div>
+ </div>
+ </a>
+ </Link>
+ ))}
+ </div>
+ </div>
+ ) : null}
{Object.keys(partnersByCategory).map((category) => (
<div key={category} id={category.toLowerCase()} className="space-y-8">
{!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}`}>
- <a
- className="
- "
- >
+ <a>
<div
className="
-
bg-scale-100 dark:bg-scale-300
hover:bg-scale-200 hover:dark:bg-scale-400
group flex h-full w-full flex-col rounded border px-6
py-6 shadow
transition-all
-
-
-
hover:shadow-lg"
>
<div className="flex w-full space-x-6">
diff --git a/apps/www/pages/partners/experts/index.tsx b/apps/www/pages/partners/experts/index.tsx
index 7c3f1c15844..c9de3a7cdc4 100644
--- a/apps/www/pages/partners/experts/index.tsx
+++ b/apps/www/pages/partners/experts/index.tsx
@@ -31,10 +31,6 @@ interface Props {
function ExpertPartnersPage(props: Props) {
const { partners } = props
- const partnersByCategory: { [category: string]: Partner[] } = {}
- partners.map(
- (p) => (partnersByCategory[p.category] = [...(partnersByCategory[p.category] ?? []), p])
- )
const router = useRouter()
const meta_title = 'Find an expert'
@@ -122,7 +118,7 @@ function ExpertPartnersPage(props: Props) {
{/* Partner Tiles */}
<div className="grid">
{partners.length ? (
- <TileGrid partnersByCategory={partnersByCategory} hideCategories={true} />
+ <TileGrid partners={partners} hideCategories={true} />
) : (
<h2 className="h2">No Partners Found</h2>
)}
diff --git a/apps/www/pages/partners/integrations/index.tsx b/apps/www/pages/partners/integrations/index.tsx
index 32f7d317cd0..2e878b0a792 100644
--- a/apps/www/pages/partners/integrations/index.tsx
+++ b/apps/www/pages/partners/integrations/index.tsx
@@ -1,7 +1,7 @@
-import { IconLoader, IconSearch, Input } from 'ui'
import { NextSeo } from 'next-seo'
import { useRouter } from 'next/router'
-import React, { useEffect, useState } from 'react'
+import { useEffect, useState } from 'react'
+import { IconLoader, IconSearch, Input } from 'ui'
import { useDebounce } from 'use-debounce'
import DefaultLayout from '~/components/Layouts/Default'
import SectionContainer from '~/components/Layouts/SectionContainer'
@@ -39,10 +39,6 @@ function IntegrationPartnersPage(props: Props) {
const allCategories = Array.from(new Set(initialPartners.map((p) => p.category)))
- const partnersByCategory: { [category: string]: Partner[] } = {}
- partners.forEach(
- (p) => (partnersByCategory[p.category] = [...(partnersByCategory[p.category] ?? []), p])
- )
const router = useRouter()
const meta_title = 'Find an Integration'
@@ -218,7 +214,7 @@ function IntegrationPartnersPage(props: Props) {
{/* Partner Tiles */}
<div className="grid space-y-10">
{partners.length ? (
- <TileGrid partnersByCategory={partnersByCategory} />
+ <TileGrid partners={partners} />
) : (
<h2 className="h2">No Partners Found</h2>
)}