Skip to content

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

chore: tidy code, remove console logs

Jonathan Summers-Muir88a3411ab2c4
diff --git a/www/components/Blog/BlogListItem.tsx b/www/components/Blog/BlogListItem.tsx
index 6e3b4abb84a..7aa37ad8285 100644
--- a/www/components/Blog/BlogListItem.tsx
+++ b/www/components/Blog/BlogListItem.tsx
@@ -1,9 +1,6 @@
-import { Badge, Space, Typography } from '@supabase/ui'
+import { Space, Typography } from '@supabase/ui'
import authors from 'lib/authors.json'
-import Link from 'next/link'
import React from 'react'
-import { capitalize } from '~/lib/helpers'
-
import Image from 'next/image'
import PostTypes from '~/types/post'
@@ -15,7 +12,6 @@ const BlogListItem = ({ blog }: Props) => {
// @ts-ignore
const author = blog.author ? authors[blog.author] : authors['supabase']
- console.log('blog', blog)
return (
<div key={blog.slug}>
<a href={`/blog/${blog.url}`}>
@@ -65,38 +61,7 @@ const BlogListItem = ({ blog }: Props) => {
</Space>
</div>
)}
-
- {/* {author && (
- <div>
- <Space size={4}>
- {author.author_image_url && (
- <img src={author.author_image_url} className="rounded-full w-8" />
- )}
- <Space direction="vertical" size={0}>
- <Typography.Text>{author.author}</Typography.Text>
- <Typography.Text type="secondary" small>
- {author.position}
- </Typography.Text>
- </Space>
- </Space>
- </div>
- )} */}
</div>
- <div className="flex space-x-3">
- {/* {blog.tags &&
- blog.tags.map((tag: string) => (
- <Link href={`/blog/tags/${tag}`} as={`/blog/tags/${tag}`}>
- <div className="transition-opacity opacity-50 hover:opacity-100">
- <Badge color="gray">{capitalize(tag.replace('-', ' '))}</Badge>
- </div>
- </Link>
- ))} */}
- </div>
-
- {/* <Typography>
- <ReactMarkdown>{blog.content.substring(0, 210) + '...'}</ReactMarkdown>
- </Typography>
- <Typography.Link>Read more</Typography.Link> */}
</div>
</a>
</div>
diff --git a/www/lib/posts.tsx b/www/lib/posts.tsx
index f977b7fc7ea..26b3ed8b95a 100644
--- a/www/lib/posts.tsx
+++ b/www/lib/posts.tsx
@@ -20,10 +20,8 @@ export const getSortedPosts = (directory: Directories, limit?: number, tags?: an
let allPostsData = fileNames.map((filename) => {
const slug = filename.replace('.mdx', '')
- // console.log('slug', slug)
const fullPath = path.join(postDirectory, filename)
- // console.log('fullPath', fullPath)
//Extracts contents of the MDX file
const fileContents = fs.readFileSync(fullPath, 'utf8')
@@ -41,7 +39,6 @@ export const getSortedPosts = (directory: Directories, limit?: number, tags?: an
const dates = getDatesFromFileName(filename)
url = `${dates.year}/${dates.month}/${dates.day}/${slug.substring(FILENAME_SUBSTRING)}`
} else {
- // console.log(slug.substring(FILENAME_SUBSTRING))
url = `/${directory.replace('_', '')}/${slug}`
}
diff --git a/www/pages/blog/[year]/[month]/[day]/[slug].tsx b/www/pages/blog/[year]/[month]/[day]/[slug].tsx
index 54e5e54e3ea..3481a7a6655 100644
--- a/www/pages/blog/[year]/[month]/[day]/[slug].tsx
+++ b/www/pages/blog/[year]/[month]/[day]/[slug].tsx
@@ -44,8 +44,6 @@ export async function getStaticPaths() {
}
export async function getStaticProps({ params }: any) {
- console.log('params', params)
-
const filePath = `${params.year}-${params.month}-${params.day}-${params.slug}`
const postContent = await getPostdata(filePath, '_blog')
const { data, content } = matter(postContent)