Showing AI reviews for avriti
Project AI Score ?
63%
Quality Avg ?
68%
Security Avg ?
45%
Reviews ?
56

Review Result ?

jattin01/avriti · afef5f79
The commit adds a detailed product detail page with related products, styled buttons, and a product detail section. It includes fetching featured products from an API and rendering them with proper mapping. The product detail section includes quantity controls and information display. However, error handling and security concerns such as input validation and secure fetch handling are minimal or missing.
Quality ?
75%
Security ?
40%
Business Value ?
70%
Maintainability ?
73%
Issues & Suggested Fixes ?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Insufficient Error Handling And No Loading...
Where app/product-detail/page.tsx:21
Issue / Evidence insufficient error handling and no loading state for fetch
Suggested Fix add loading and error states to improve UX and robustness
Insecure Plain Fetch With No Error Feedbac...
Where app/product-detail/page.tsx:21
Issue / Evidence insecure plain fetch with no error feedback
Suggested Fix improve error handling and consider using AbortController or secure fetch tools
Potential Undefined Attributes Access
Where app/product-detail/page.tsx:28-29
Issue / Evidence potential undefined attributes access
Suggested Fix add proper validation and fallback defaults to avoid runtime errors
Dummy Product Description And Hardcoded Pr...
Where components/ProductDetailSection.tsx:14
Issue / Evidence dummy product description and hardcoded product data
Suggested Fix replace with dynamic data source or include props for real product data to increase business value
Lack Of Accessibility On Buttons (No Aria ...
Where components/ProductDetailSection.tsx:71
Issue / Evidence lack of accessibility on buttons (no aria-labels)
Suggested Fix add proper accessibility attributes for better usability
Minimal And Unclear
Where commit message
Issue / Evidence minimal and unclear
Suggested Fix enhance commit message with detailed description of changes and purpose to improve code maintainability and reviewability
Code Change Preview · app/globals.css ?
Removed / Before Commit
- border-radius: 50%;
- right: 100%;
- border: 1px solid #0B3DBA;
- }
- @media only screen and (max-width: 767px) {
- li, p {
Added / After Commit
+ border-radius: 50%;
+ right: 100%;
+ border: 1px solid #0B3DBA;
+ }
+ .addtocartButton span.buttonArrow::before {
+     background: #fff;
+ }
+ .addtocartButton span.buttonArrow::after {
+     border-color: #fff;
+ }
+ .addtocartButton:hover span.buttonArrow::after {
+     border-color: #0B3DBA;
+ }
+ .addtocartButton:hover span.buttonArrow::before {
+     background: #0B3DBA;
+ }
+ @media only screen and (max-width: 767px) {
+ li, p {
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ "use client";
+ import { useEffect, useState } from "react";
+ import Breadcrumb from "@/components/common/Breadcrumb";
+ import ProductDetailSection from "@/components/ProductDetailSection";
+ import ProductTabs from "@/components/product-tabs";
+ import { ProductCard } from "@/components/product-card";
+ type FeaturedProduct = {
+   slug: string;
+   name: string;
+   attrName: string;
+   price: string;
+   image: string;
+   tone: string;
+   category: string;
+   badge: string;
+   description: string;
+ };
+ export default function ProductDetail() {
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ "use client";
+ 
+ import Link from "next/link";
+ import { usePathname } from "next/navigation";
+ 
+ export default function Breadcrumb() {
+   const pathname = usePathname();
+ 
+   const segments = pathname.split("/").filter(Boolean);
+ 
+   const labelMap: Record<string, string> = {
+     "product-detail": "Product Detail",
+     "order-list": "Order List",
+     "my-order": "My Order",
+     "track-order": "Track Order",
+     "about": "About Us",
+     "consult": "Consult",
+     "services": "Services",
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ "use client";
+ 
+ import { useState } from "react";
+ 
+ const tabs = ["Description", "Reviews", "Shipping"];
+ 
+ const tabContent: Record<string, React.ReactNode> = {
+   Description: (
+     <p className="text-gray-600 text-sm leading-relaxed">
+       The world is loud. Notifications, deadlines, demands. Everyone wants your attention, your time, your energy. Somewhere in that noise, you lose yourself.The world is loud. Notifications, deadlines, demands. Everyone wants your attention, your time, your energy. Somewhere in that noise, you lose yourself.The world is loud. Notifications, deadlines, demands. Everyone wants your attention, your time, your energy. Somewhere in that noise, you lose yourself.
+     </p>
+   ),
+   Reviews: (
+     <p className="text-gray-600 text-sm leading-relaxed">
+       No reviews yet. Be the first to review this product.
+     </p>
+   ),
+   Shipping: (
Removed / Before Commit

                                                
Added / After Commit
+ "use client";
+ 
+ import { useState } from "react";
+ 
+ const product = {
+   name: "Astrology of the Moon",
+   originalPrice: 142,
+   salePrice: 89,
+   onSale: true,
+   sku: "20",
+   categories: ["Astrology", "Zodiac"],
+   tags: ["Book", "Spiritual"],
+   description:
+     "Ut eos quia voluptatum doloremque deleniti vitae vel. Laboriosam iste iusto conse qua tur esse quas autem dolor dignisos molesti tione sint a voluptatum nemo. Recu sandae assum enda quaerat. Sed explicabo aut labore enim aliquam.",
+   image: "/1.jpeg",
+ };
+ 
+ export default function ProductDetailSection() {