EverydayTech Platform - Developer Reference
Complete Source Code Documentation - All Applications
Loading...
Searching...
No Matches
page.tsx
Go to the documentation of this file.
1"use client";
2
3import { Icon } from '@/contexts/IconContext';
4
5export default function SpellingIssuesReport() {
6 // Mock data - replace with actual API call
7 const issues = [
8 { id: 1, sku: "CART-001", currentText: "HP Blak Ink Cartridge", suggestion: "HP Black Ink Cartridge", confidence: 95 },
9 { id: 2, sku: "PAPER-A4", currentText: "A4 Coppy Paper", suggestion: "A4 Copy Paper", confidence: 90 },
10 { id: 3, sku: "USB-C01", currentText: "USB Cabl Type-C", suggestion: "USB Cable Type-C", confidence: 88 },
11 ];
12
13 return (
14 <div className="p-6 min-h-screen bg-bg">
15 <div className="mb-6">
16 <div className="flex items-center gap-3 mb-2">
17 <a href="/pages/reports?source=advisor" className="text-muted hover:text-brand">
18 <Icon name="arrow_back" size={24} />
19 </a>
20 <h1 className="text-3xl font-bold text-text">Spelling Issues</h1>
21 </div>
22 <p className="text-muted ml-9">
23 Potential spelling errors detected in product names and descriptions
24 </p>
25 </div>
26
27 <div className="bg-surface rounded-lg shadow-sm border border-border overflow-hidden">
28 <div className="overflow-x-auto">
29 <table className="w-full">
30 <thead className="bg-[var(--brand)] text-surface">
31 <tr>
32 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
33 SKU
34 </th>
35 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
36 Current Text
37 </th>
38 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
39 Suggested Correction
40 </th>
41 <th className="px-6 py-3 text-center text-xs font-medium uppercase tracking-wider">
42 Confidence
43 </th>
44 <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
45 Actions
46 </th>
47 </tr>
48 </thead>
49 <tbody className="divide-y divide-border">
50 {issues.length === 0 ? (
51 <tr>
52 <td colSpan={5} className="px-6 py-12 text-center">
53 <Icon name="check_circle" size={48} className="text-success mx-auto mb-3" />
54 <p className="text-muted">No spelling issues detected</p>
55 </td>
56 </tr>
57 ) : (
58 issues.map((issue) => (
59 <tr key={issue.id} className="hover:bg-surface-2">
60 <td className="px-6 py-4 whitespace-nowrap text-sm font-medium text-text">
61 {issue.sku}
62 </td>
63 <td className="px-6 py-4 text-sm text-error">
64 {issue.currentText}
65 </td>
66 <td className="px-6 py-4 text-sm text-success">
67 {issue.suggestion}
68 </td>
69 <td className="px-6 py-4 whitespace-nowrap text-center">
70 <span className={`px-2 py-1 text-xs rounded ${
71 issue.confidence >= 90 ? 'bg-success/20 text-success' :
72 issue.confidence >= 80 ? 'bg-warning/20 text-warning' :
73 'bg-surface-2 text-muted'
74 }`}>
75 {issue.confidence}%
76 </span>
77 </td>
78 <td className="px-6 py-4 whitespace-nowrap text-sm">
79 <button className="text-success hover:text-success/80 mr-3">
80 Accept
81 </button>
82 <button className="text-muted hover:text-text mr-3">
83 Ignore
84 </button>
85 <button className="text-brand hover:text-brand2">
86 Edit
87 </button>
88 </td>
89 </tr>
90 ))
91 )}
92 </tbody>
93 </table>
94 </div>
95 </div>
96 </div>
97 );
98}