Frontend: Wire Explore page to real API data #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replace the hardcoded
allComparisonsarray insrc/app/(main)/explore/page.tsxwith real API calls.Implementation
useEffect+fetchtoGET /api/comparisonssearchQuerystate should trigger API calls (debounced 300ms)/compare/{slug}(currently links to/compare/${comparison.id}which is wrong — should use slug)Data Mapping
The API returns
itemsas string[] (just names). Map to the existing card shape:comparison.items.join(" vs ")→ subtitlecomparison.tags→ badgescomparison.viewCount→ eye icon statcomparison.slug→ link hrefFiles
src/app/(main)/explore/page.tsxAcceptance Criteria