From d28d909559e58d720f9eb75548774cfd81388ae0 Mon Sep 17 00:00:00 2001 From: Yangshun Date: Mon, 7 Feb 2022 12:03:48 +0800 Subject: [PATCH] chore(www): fix all the react duplicate keys warnings --- .../Carousels/SplitCodeBlockCarousel.tsx | 4 +- www/components/ImageGrid.tsx | 38 +++++++++---------- www/pages/auth/Auth.tsx | 9 +++-- www/pages/blog.tsx | 15 +++++--- .../blog/[year]/[month]/[day]/[slug].tsx | 6 +-- www/pages/database/Database.tsx | 12 +++--- www/pages/storage/Storage.tsx | 17 +++++---- 7 files changed, 54 insertions(+), 47 deletions(-) diff --git a/www/components/Carousels/SplitCodeBlockCarousel.tsx b/www/components/Carousels/SplitCodeBlockCarousel.tsx index 2783f21ebc9..d6df338b85b 100644 --- a/www/components/Carousels/SplitCodeBlockCarousel.tsx +++ b/www/components/Carousels/SplitCodeBlockCarousel.tsx @@ -70,7 +70,7 @@ function SplitCodeBlockCarousel(props: SplitCodeBlockCarousel) { > {props.content.map((extension, i) => { return ( - + ) @@ -140,7 +140,7 @@ function SplitCodeBlockCarousel(props: SplitCodeBlockCarousel) { {extension.badges && extension.badges.map((badge, i) => { - return {badge} + return {badge} })} diff --git a/www/components/ImageGrid.tsx b/www/components/ImageGrid.tsx index ee0604954c4..089e7ca9b2d 100644 --- a/www/components/ImageGrid.tsx +++ b/www/components/ImageGrid.tsx @@ -81,39 +81,37 @@ const ImageGrid = ({ } return ( - <> - -
+
-
+
- {x.alt} -
+ />
- - +
+ ) })}
diff --git a/www/pages/auth/Auth.tsx b/www/pages/auth/Auth.tsx index b0347768377..f512cc92510 100644 --- a/www/pages/auth/Auth.tsx +++ b/www/pages/auth/Auth.tsx @@ -81,7 +81,7 @@ function AuthPage(props: Props) { "Including PostgreSQL's policy engine, for fine-grained access rules.", ]} image={[ -
+
auth header
, -
+
auth header ) })} @@ -179,7 +180,7 @@ function AuthPage(props: Props) { content={ApiExamples} size="large" text={[ - +

APIs that you can understand. With powerful libraries that work on client and server-side applications. @@ -192,7 +193,7 @@ function AuthPage(props: Props) { , ]} footer={[ -

+
} diff --git a/www/pages/blog.tsx b/www/pages/blog.tsx index edb52aa9a02..15b84d4c467 100644 --- a/www/pages/blog.tsx +++ b/www/pages/blog.tsx @@ -88,9 +88,9 @@ function Blog(props: any) {
- {props.blogs.slice(0, 1).map((blog: any, idx: any) => { - return FeaturedThumb(blog) - })} + {props.blogs.slice(0, 1).map((blog: any, i: number) => ( + + ))}
@@ -102,7 +102,7 @@ function Blog(props: any) {
{props.categories.map((categoryId: string) => ( - + {/*

{categoryId}

*/} <>
@@ -114,8 +114,11 @@ function Blog(props: any) {
    {blogs.map((blog: PostTypes, idx: number) => ( -
    - +
    +
    ))}
diff --git a/www/pages/blog/[year]/[month]/[day]/[slug].tsx b/www/pages/blog/[year]/[month]/[day]/[slug].tsx index 4d04b930153..8a6b9511594 100644 --- a/www/pages/blog/[year]/[month]/[day]/[slug].tsx +++ b/www/pages/blog/[year]/[month]/[day]/[slug].tsx @@ -108,7 +108,7 @@ function BlogPostPage(props: any) {
{post.tags.map((tag: string) => { - return {tag} + return {tag} })}
@@ -124,8 +124,8 @@ function BlogPostPage(props: any) { {props.blog.tags.map((tag: string) => { return ( - - {tag} + + {tag} ) })} diff --git a/www/pages/database/Database.tsx b/www/pages/database/Database.tsx index 56c79eb8b18..6bf20169719 100644 --- a/www/pages/database/Database.tsx +++ b/www/pages/database/Database.tsx @@ -85,7 +85,7 @@ function Database() { 'PostgreSQL is one of the worlds most scalable databases.', ]} image={[ -
+
database header
, -
+
database header, @@ -258,13 +260,13 @@ function Database() { content={ApiExamplesData} title="Never write an API again" text={[ -

+

We introspect your database and provide instant APIs. Focus on building your product, while Supabase handles the CRUD.

, ]} footer={[ -
+
@@ -284,7 +286,7 @@ function Database() {
-
+
{/* + Store and serve
any type of digital content
, @@ -68,7 +68,7 @@ function StoragePage() { 'With custom policies and permissions that are familiar and easy to implement.', ]} image={[ -
+
storage header
, -
+
storage headerCheck out our example app, + + Check out our example app + , // !! Update this example !! Built from the ground up for interoperable authentication.

, -

+

Built from the ground up for interoperable authentication.

, +

Fast and easy to implement using our powerful library clients. Asset optimization and image transformation coming soon!

, ]} footer={[ -
+
}