AI Review Center
Commit Review Workspace ?
Select a commit on the left to inspect quality, security, business value, findings, and suggested code changes.
Project AI Score
?
63%
Quality Avg
?
68%
Security Avg
?
45%
Reviews
?
56
Review Result ?
jattin01/avriti · 118441d1
This commit adds a comprehensive blog page including fetching blog data, rendering it with SEO metadata, and a sidebar with search, tags, and recent posts. The code is organized and includes error handling for missing posts. However, there is moderate bug risk due to usage of dangerouslySetInnerHTML without sanitization, which also reduces security score. The implementation provides relevant business value by enabling blog content display with SEO metadata. The styling adds good presentation but no direct impact on functionality or security.
Quality
?
75%
Security
?
40%
Business Value
?
80%
Maintainability
?
78%
Issues & Suggested Fixes
?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Use Of Dangerouslysetinnerhtml Without San...
Where
app/blog/[slug]/page.tsx:103
Issue / Evidence
use of dangerouslySetInnerHTML without sanitization
Suggested Fix
sanitize or validate HTML content before injecting to improve security and reduce bug risk
Fetch Error Handling Is Generic
Where
app/blog/[slug]/page.tsx:31-35
Issue / Evidence
fetch error handling is generic
Suggested Fix
improve error logging or specific error handling to catch API failures and improve debugging
Metadata Generation Fallback Could Be More...
Where
app/blog/[slug]/page.tsx:41-57
Issue / Evidence
metadata generation fallback could be more detailed
Suggested Fix
add more descriptive defaults to improve SEO and business value
Tags Rendered As Clickable Spans Without A...
Where
app/blog/[slug]/page.tsx:134-136
Issue / Evidence
tags rendered as clickable spans without action
Suggested Fix
convert to links or add tag filtering functionality to improve UX and business value
Improve Commit Message To Be More Descript...
Where
commit message
Issue / Evidence
improve commit message to be more descriptive about features added, e.g., include details about SEO metadata and sidebar content
Suggested Fix
Review and simplify this section.
Code Change Preview · app/blog/[slug]/page.tsx
?
Removed / Before Commit
Added / After Commit
+ import Link from "next/link"; + import { notFound } from "next/navigation"; + import { BlogSearch } from "@/components/blog-search"; + import "../blog.css"; + + type BlogCard = { + id: number; + title: string; + slug: string; + excerpt: string | null; + image: string | null; + category: string | null; + author: string | null; + read_time: string | null; + date: string | null; + }; + + type BlogDetail = BlogCard & {
Removed / Before Commit
Added / After Commit
+ /* Rich content styling for blog articles (Jodit output) */ + + .blog-content h1 { + font-size: 30px; + font-weight: 700; + line-height: 1.3; + color: var(--color-primary-700); + margin: 28px 0 14px; + } + .blog-content h2 { + font-size: 26px; + font-weight: 700; + line-height: 1.3; + color: var(--color-primary-700); + margin: 26px 0 12px; + } + .blog-content h3 { + font-size: 22px;
Removed / Before Commit
Added / After Commit
+ import Link from "next/link"; + import Breadcrumb from "@/components/common/Breadcrumb"; + import { BlogSearch } from "@/components/blog-search"; + + export const metadata = { + title: "Blog | Avriti", + description: + "Vedic wisdom, astrology insights, Vastu tips, and honest spiritual guidance from the Avriti team.", + }; + + type BlogCard = { + id: number; + title: string; + slug: string; + excerpt: string | null; + image: string | null; + category: string | null; + author: string | null;
Removed / Before Commit
- { src: "/facebook.png", alt: "Facebook", href: "https://www.facebook.com/profile.php?id=61589667186265" }, - { src: "/pinterest.png", alt: "Pinterest", href: "https://in.pinterest.com/avriti_i/" }, - { src: "/linkedin.png", alt: "LinkedIn", href: "https://www.linkedin.com/company/avriti/?viewAsMember=true" }, - { src: "/youtube.png", alt: "YouTube", href: "#" }, - { src: "/threads.png", alt: "Threads", href: "#" }, - ].map((social) => ( - <li key={social.alt}> - <a href={social.href} target="_blank" rel="noopener noreferrer"><img src={social.src} alt={social.alt} className="w-[25px] h-[25px]" /></a>
Added / After Commit
+ { src: "/facebook.png", alt: "Facebook", href: "https://www.facebook.com/profile.php?id=61589667186265" }, + { src: "/pinterest.png", alt: "Pinterest", href: "https://in.pinterest.com/avriti_i/" }, + { src: "/linkedin.png", alt: "LinkedIn", href: "https://www.linkedin.com/company/avriti/?viewAsMember=true" }, + // { src: "/youtube.png", alt: "YouTube", href: "#" }, + // { src: "/threads.png", alt: "Threads", href: "#" }, + ].map((social) => ( + <li key={social.alt}> + <a href={social.href} target="_blank" rel="noopener noreferrer"><img src={social.src} alt={social.alt} className="w-[25px] h-[25px]" /></a>
Removed / Before Commit
Added / After Commit
+ "use client"; + + import { useRouter } from "next/navigation"; + import { useState } from "react"; + + export function BlogSearch({ initial = "" }: { initial?: string }) { + const router = useRouter(); + const [q, setQ] = useState(initial); + + const submit = (e: React.FormEvent) => { + e.preventDefault(); + const query = q.trim(); + router.push(query ? `/blog?q=${encodeURIComponent(query)}` : "/blog"); + }; + + return ( + <form onSubmit={submit} className="relative"> + <input
Removed / Before Commit
- "consult": "Consult", - "services": "Services", - "shop": "Shop", - "cart": "Cart", - "checkout": "Checkout", - "login": "Login", - - return ( - <nav className="bg-[#0b3dba] text-sm"> - <div className="mx-auto max-w-7xl flex items-center gap-2 px-4 sm:px-6 lg:px-8 py-2 "> - <Link href="/" className="text-gray-400 hover:text-white transition-colors"> - Home - </Link> - </span> - ); - })} - </div> - </nav>
Added / After Commit
+ "consult": "Consult", + "services": "Services", + "shop": "Shop", + "blog": "Blog", + "cart": "Cart", + "checkout": "Checkout", + "login": "Login", + + return ( + <nav className="bg-[#0b3dba] text-sm"> + {/* <div className="mx-auto max-w-7xl flex items-center gap-2 px-4 sm:px-6 lg:px-8 py-2 "> + <Link href="/" className="text-gray-400 hover:text-white transition-colors"> + Home + </Link> + </span> + ); + })} + </div> */}
Removed / Before Commit
- - import { useState } from "react"; - import Link from "next/link"; - import { Camera, PlaySquare } from "lucide-react"; - import { Button } from "@/components/ui/button"; - import { Input } from "@/components/ui/input"; - import Image from "next/image"; - Sacred products, Vedic-inspired consultations, and calm practical - guidance for everyday decisions. - </p> - <div className="mt-5 flex gap-3 text-[var(--color-primary-700)]"> - <Link href="#" aria-label="Instagram"> - <Camera size={20} /> - </Link> - <Link href="#" aria-label="YouTube"> - <PlaySquare size={22} /> - </Link> - </div>
Added / After Commit
+ + import { useState } from "react"; + import Link from "next/link"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import Image from "next/image"; + Sacred products, Vedic-inspired consultations, and calm practical + guidance for everyday decisions. + </p> + <div className="mt-5 flex items-center gap-3"> + {[ + { src: "/instagram.png", alt: "Instagram", href: "https://www.instagram.com/_avriti__/" }, + { src: "/facebook.png", alt: "Facebook", href: "https://www.facebook.com/profile.php?id=61589667186265" }, + { src: "/linkedin.png", alt: "LinkedIn", href: "https://www.linkedin.com/company/avriti/?viewAsMember=true" }, + { src: "/pinterest.png", alt: "Pinterest", href: "https://in.pinterest.com/avriti_i/" }, + ].map((s) => ( + <a + key={s.alt}
Removed / Before Commit
- - const rightNav = [ - { href: "/about", label: "About" }, - { href: "/contact", label: "Connect" }, - ];
Added / After Commit
+ + const rightNav = [ + { href: "/about", label: "About" }, + { href: "/blog", label: "Blog" }, + { href: "/contact", label: "Connect" }, + ];