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 · f2b9d259
The commit adds two fetch calls to external API endpoints and an orphaned commented line. There is no error handling, no use of environment variables for sensitive URLs, and the commit message is uninformative. This reduces code quality, introduces potential runtime bugs, and poses security risks by exposing hardcoded URLs.
Quality
?
40%
Security
?
20%
Business Value
?
30%
Maintainability
?
45%
Issues & Suggested Fixes
?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Missing Error Handling On Fetch
Where
app/shop/page.tsx:34
Issue / Evidence
missing error handling on fetch
Suggested Fix
add try-catch or use .catch to handle network failures
Missing Error Handling On Fetch
Where
app/shop/page.tsx:43
Issue / Evidence
missing error handling on fetch
Suggested Fix
add proper error handling to avoid runtime failures
Insecure Hardcoded Api Url
Where
app/shop/page.tsx:34
Issue / Evidence
insecure hardcoded API url
Suggested Fix
move API endpoint to environment variables or config files
Insecure Hardcoded Api Url
Where
app/shop/page.tsx:43
Issue / Evidence
insecure hardcoded API url
Suggested Fix
move API endpoint to environment variables or config files
Commented Out Code
Where
app/shop/page.tsx:291
Issue / Evidence
commented out code
Suggested Fix
remove commented code if not needed to increase clarity
Uninformative Message
Where
commit message
Issue / Evidence
uninformative message
Suggested Fix
provide a descriptive commit message explaining the code changes
Code Change Preview · app/shop/page.tsx
?
Removed / Before Commit
- - useEffect(() => { - const fetchCategories = async () => { - const res = await fetch('http://localhost:8000/api/categories'); - const data = await res.json(); - setCategories(data.data); - }; - - useEffect(() => { - const fetchProducts = async () => { - const res = await fetch('http://localhost:8000/api/product'); - const data = await res.json(); - setProducts(data.data); - }; - // </PdfBrowserFrame> - // </div> - // ); - // }
Added / After Commit
+ + useEffect(() => { + const fetchCategories = async () => { + const res = await fetch('https://api.digitalmission.in/api/categories'); + const data = await res.json(); + setCategories(data.data); + }; + + useEffect(() => { + const fetchProducts = async () => { + const res = await fetch('https://api.digitalmission.in/api/product'); + const data = await res.json(); + setProducts(data.data); + }; + // </PdfBrowserFrame> + // </div> + // ); + \ No newline at end of file