From f7646504eae5456f738062f7ea92e7c7bd0a79aa Mon Sep 17 00:00:00 2001 From: Khushal Bhardwaj Date: Sun, 14 Jun 2026 12:55:08 +0530 Subject: [PATCH 1/3] Fix React Review audit warnings (#3) Resolves all 35 warnings from issue #3 across grouped sub-issues: - #5 design-no-redundant-size-axes: collapse w-N h-N to size-N (13) - #6 rendering-hydration-mismatch-time: suppressHydrationWarning on date elements (7) - #7 design: bg-black->bg-gray-950, font-bold->font-semibold, em-dash->comma (7) - #8 server async: Promise.all for independent awaits in blog/[slug]/page (3) - #9 nextjs/a11y/memo: metadata export, next/image, memo default const, Card keyboard a11y (5) Closes #5, closes #6, closes #7, closes #8, closes #9 --- app/(frontend)/blog/[slug]/page.tsx | 12 +++++------- app/(frontend)/blog/page.tsx | 4 ++-- app/(frontend)/layout.tsx | 2 +- app/(frontend)/not-found.tsx | 2 +- app/(frontend)/page.tsx | 9 ++++++++- components/about.tsx | 2 +- components/blogs.tsx | 4 ++-- components/footer.tsx | 2 +- components/greeting.tsx | 8 ++++---- components/projects.tsx | 6 +++--- components/ui/blog-card.tsx | 4 ++-- components/ui/card.tsx | 14 ++++++++++++++ components/ui/dithering-shader.tsx | 4 +++- components/ui/project-card.tsx | 8 ++++---- components/ui/stack-card.tsx | 4 ++-- next.config.ts | 6 +++++- 16 files changed, 58 insertions(+), 33 deletions(-) diff --git a/app/(frontend)/blog/[slug]/page.tsx b/app/(frontend)/blog/[slug]/page.tsx index ad5859b..5f1b8ea 100644 --- a/app/(frontend)/blog/[slug]/page.tsx +++ b/app/(frontend)/blog/[slug]/page.tsx @@ -15,8 +15,7 @@ type Props = { }; export async function generateMetadata({ params }: Props): Promise { - const { slug } = await params; - const payload = await getPayload({ config }); + const [{ slug }, payload] = await Promise.all([params, getPayload({ config })]); const { docs: [post], } = await payload.find({ @@ -34,8 +33,7 @@ export async function generateMetadata({ params }: Props): Promise { } export default async function BlogPostPage({ params }: Props) { - const { slug } = await params; - const payload = await getPayload({ config }); + const [{ slug }, payload] = await Promise.all([params, getPayload({ config })]); const { docs: [post], } = await payload.find({ @@ -57,7 +55,7 @@ export default async function BlogPostPage({ params }: Props) { href="/blog" className="text-neutral-500 text-sm hover:text-white transition-colors duration-300" > - Back to blog + Back to blog @@ -66,7 +64,7 @@ export default async function BlogPostPage({ params }: Props) {

{post.title}

- + {new Date(post.publishedAt).toLocaleDateString("en-US", { year: "numeric", month: "long", @@ -118,7 +116,7 @@ export default async function BlogPostPage({ params }: Props) { href="/blog" className="text-neutral-500 text-sm hover:text-white transition-colors duration-300" > - Back to all posts + Back to all posts
diff --git a/app/(frontend)/blog/page.tsx b/app/(frontend)/blog/page.tsx index 185e24c..5da82a0 100644 --- a/app/(frontend)/blog/page.tsx +++ b/app/(frontend)/blog/page.tsx @@ -26,7 +26,7 @@ export default async function BlogPage() { href="/" className="text-neutral-500 text-sm hover:text-white transition-colors duration-300" > - Back + Back @@ -44,7 +44,7 @@ export default async function BlogPage() {
- + {new Date(post.publishedAt).toLocaleDateString("en-US", { year: "numeric", month: "short", diff --git a/app/(frontend)/layout.tsx b/app/(frontend)/layout.tsx index 9ea4b38..f50e9fe 100644 --- a/app/(frontend)/layout.tsx +++ b/app/(frontend)/layout.tsx @@ -29,7 +29,7 @@ export default function RootLayout({ }) { return ( - + {children} diff --git a/app/(frontend)/not-found.tsx b/app/(frontend)/not-found.tsx index 5cb255c..a9c24bd 100644 --- a/app/(frontend)/not-found.tsx +++ b/app/(frontend)/not-found.tsx @@ -2,7 +2,7 @@ import Link from "next/link"; export default function NotFound() { return ( -
+

404

This page doesn't exist.

diff --git a/app/(frontend)/page.tsx b/app/(frontend)/page.tsx index 159895a..77193fa 100644 --- a/app/(frontend)/page.tsx +++ b/app/(frontend)/page.tsx @@ -1,5 +1,6 @@ export const dynamic = "force-dynamic"; +import type { Metadata } from "next"; import { About } from "@/components/about"; import { Blogs } from "@/components/blogs"; import { Footer } from "@/components/footer"; @@ -10,9 +11,15 @@ import { Stack } from "@/components/stack"; import { HeroShader } from "@/components/hero-shader"; import Link from "next/link"; +export const metadata: Metadata = { + title: "Khushal Bhardwaj | Full Stack Web Developer", + description: + "Portfolio of Khushal Bhardwaj, a Full Stack Web Developer based in Jaipur, India, building web apps with React and Next.js.", +}; + export default function Home() { return ( -
+
{/* Navigation - top right */}
diff --git a/components/about.tsx b/components/about.tsx index e0794c7..65aa457 100644 --- a/components/about.tsx +++ b/components/about.tsx @@ -5,7 +5,7 @@ export function About() {

Hey, I'm{" "} - Khushal Bhardwaj — a + Khushal Bhardwaj, a Full Stack Web Developer based in Jaipur, India. Passionate about building web apps with React/NextJS. I'm also an undergrad at VIT Bhopal University. diff --git a/components/blogs.tsx b/components/blogs.tsx index 471d1cc..9115d27 100644 --- a/components/blogs.tsx +++ b/components/blogs.tsx @@ -27,7 +27,7 @@ export async function Blogs() { {post.title}

- + {new Date(post.publishedAt).toLocaleDateString("en-US", { year: "numeric", month: "short", @@ -53,7 +53,7 @@ export async function Blogs() { href="/blog" className="text-neutral-500 text-xs hover:text-white transition-colors duration-300 inline-block mt-2" > - View all posts + View all posts ); diff --git a/components/footer.tsx b/components/footer.tsx index 694a9a9..12ba2d5 100644 --- a/components/footer.tsx +++ b/components/footer.tsx @@ -11,7 +11,7 @@ export function Footer() { return (