Skip to content

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

clean up customers index code

Francesco Sansalvadore5c3030588ba7
diff --git a/apps/www/pages/customers/index.tsx b/apps/www/pages/customers/index.tsx
index d5559309ec7..f8644b4d089 100644
--- a/apps/www/pages/customers/index.tsx
+++ b/apps/www/pages/customers/index.tsx
@@ -1,12 +1,11 @@
import fs from 'fs'
-import { useEffect, useState } from 'react'
import { useRouter } from 'next/router'
import Head from 'next/head'
import { NextSeo } from 'next-seo'
import { generateRss } from '~/lib/rss'
-import { getSortedPosts, getAllTags, getAllCategories } from '~/lib/posts'
+import { getSortedPosts } from '~/lib/posts'
import DefaultLayout from '~/components/Layouts/Default'
import PostTypes from '~/types/post'
@@ -17,8 +16,6 @@ import { GlassPanel } from 'ui'
export async function getStaticProps() {
const allPostsData = getSortedPosts({ directory: '_customers' })
- const categories = getAllCategories('_customers')
- const tags = getAllTags('_customers')
const rss = generateRss(allPostsData)
// create a rss feed in public directory
@@ -28,14 +25,11 @@ export async function getStaticProps() {
return {
props: {
blogs: allPostsData,
- tags,
},
}
}
function CustomerStoriesPage(props: any) {
- const [tag, setTag] = useState('all')
- const [blogs, setBlogs] = useState(props.blogs)
const { basePath } = useRouter()
const meta = {
@@ -45,19 +39,7 @@ function CustomerStoriesPage(props: any) {
'See how Supabase empowers companies of all sizes to accelerate their growth and streamline their work.',
}
- useEffect(() => {
- // Update the document title using the browser API
- setBlogs(
- tag === 'all'
- ? props.blogs
- : props.blogs.filter((post: any) => {
- const found = post.tags?.includes(tag)
- return found
- })
- )
- }, [tag])
-
- const caseStudyThumbs = blogs.map((blog: PostTypes, idx: number) => {
+ const caseStudyThumbs = props.blogs?.map((blog: PostTypes, idx: number) => {
return {
logo: blog.logo,
logoInverse: blog.logo_inverse,