Skip to content

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

feat: works with gallery page start

thorwebdev2fbd75d6f92f
diff --git a/www/pages/partners/Partners.css b/www/pages/partners/Partners.css
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/www/pages/partners/Partners.tsx b/www/pages/partners/Partners.tsx
new file mode 100644
index 00000000000..419ca7eeb25
--- /dev/null
+++ b/www/pages/partners/Partners.tsx
@@ -0,0 +1,102 @@
+import { Typography, Tabs } from '@supabase/ui'
+import { NextSeo } from 'next-seo'
+import Image from 'next/image'
+import Link from 'next/link'
+import { useRouter } from 'next/router'
+import { useState } from 'react'
+import DefaultLayout from '~/components/Layouts/Default'
+import SectionContainer from '~/components/Layouts/SectionContainer'
+import TileGrid from './TileGrid'
+
+interface Partner {
+ title: string
+ size: string
+ source: string
+}
+
+export async function getStaticProps() {
+ const res = await fetch('https://example.com')
+ console.log(res.status)
+ // TODO fetch from DB
+ const partners: Partner[] = [
+ {
+ title: 'IMG_4985.HEIC',
+ size: '3.9 MB',
+ source:
+ 'https://images.unsplash.com/photo-1582053433976-25c00369fc93?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=512&q=80',
+ },
+ // More files...
+ ]
+
+ return {
+ props: {
+ partners,
+ },
+ revalidate: 3600, // In seconds
+ }
+}
+
+interface Props {
+ partners: Partner[]
+}
+
+function PartnerPage(props: Props) {
+ const { partners } = props
+ // base path for images
+ const { basePath } = useRouter()
+
+ const [tabId, setTabId] = useState('integrations')
+
+ const meta_title = 'Works with Supabase'
+ const meta_description = `Find Integration Partners and Expert Services that work with Supabase.`
+
+ return (
+ <>
+ <NextSeo
+ title={meta_title}
+ description={meta_description}
+ openGraph={{
+ title: meta_title,
+ description: meta_description,
+ url: `https://supabase.com/partners`,
+ images: [
+ {
+ url: `https://supabase.com${basePath}/images/product/database/database-og.jpg`, // TODO
+ },
+ ],
+ }}
+ />
+ <DefaultLayout>
+ <SectionContainer>
+ <Typography.Title className="text-center">{`Find an ${
+ tabId === 'integrations' ? 'Integration' : 'Expert'
+ }`}</Typography.Title>
+ <div className="grid">
+ <div className={'dashboard-tabs sbui-tabs--underline-alt'}>
+ <Tabs
+ size="xlarge"
+ activeId={tabId}
+ onChange={setTabId}
+ type="underlined"
+ tabBarStyle={{
+ marginBottom: 0,
+ // borderBottom: '1px solid #dedede',
+ }}
+ // block
+ >
+ <Tabs.Panel id="integrations" label="Integrations">
+ {partners ? <TileGrid category={tabId} partners={partners} /> : ''}
+ </Tabs.Panel>
+ <Tabs.Panel id="experts" label="Experts">
+ {partners ? <TileGrid category={tabId} partners={partners} /> : ''}
+ </Tabs.Panel>
+ </Tabs>
+ </div>
+ </div>
+ </SectionContainer>
+ </DefaultLayout>
+ </>
+ )
+}
+
+export default PartnerPage
diff --git a/www/pages/partners/TileGrid.tsx b/www/pages/partners/TileGrid.tsx
new file mode 100644
index 00000000000..76a298e31ea
--- /dev/null
+++ b/www/pages/partners/TileGrid.tsx
@@ -0,0 +1,42 @@
+interface Partner {
+ title: string
+ size: string
+ source: string
+}
+
+export default function TileGrid({
+ category,
+ partners,
+}: {
+ category: string
+ partners: Partner[]
+}) {
+ console.log(partners, category)
+ return (
+ <ul
+ role="list"
+ className="grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 sm:gap-x-6 lg:grid-cols-4 xl:gap-x-8"
+ >
+ {partners.map((partner) => (
+ <li key={partner.source} className="relative">
+ <div className="group block w-full aspect-w-10 aspect-h-7 rounded-lg bg-gray-100 focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-gray-100 focus-within:ring-indigo-500 overflow-hidden">
+ <img
+ src={partner.source}
+ alt=""
+ className="object-cover pointer-events-none group-hover:opacity-75"
+ />
+ <button type="button" className="absolute inset-0 focus:outline-none">
+ <span className="sr-only">View details for {partner.title}</span>
+ </button>
+ </div>
+ <p className="mt-2 block text-sm font-medium text-gray-900 truncate pointer-events-none">
+ {partner.title}
+ </p>
+ <p className="block text-sm font-medium text-gray-500 pointer-events-none">
+ {partner.size}
+ </p>
+ </li>
+ ))}
+ </ul>
+ )
+}
diff --git a/www/pages/partners/index.tsx b/www/pages/partners/index.tsx
new file mode 100644
index 00000000000..ea9b0bc2383
--- /dev/null
+++ b/www/pages/partners/index.tsx
@@ -0,0 +1,3 @@
+import Partners from './Partners'
+
+export default Partners