Spaces:
Running
Running
Merge pull request #71 from algojogacor/fix/0-indexed-page-display
Browse filesfix(source-card): display 1-indexed page numbers instead of 0-indexed
frontend/src/components/chat/SourceCard.tsx
CHANGED
|
@@ -42,9 +42,9 @@ export default function SourceCard({ sources, onPageClick }: Props) {
|
|
| 42 |
key={i}
|
| 43 |
variant="secondary"
|
| 44 |
className="text-[10px] h-5 cursor-pointer hover:bg-primary/20 transition-colors"
|
| 45 |
-
onClick={() => onPageClick(src.page)}
|
| 46 |
>
|
| 47 |
-
p.{src.page} • {src.confidence}%
|
| 48 |
</Badge>
|
| 49 |
))}
|
| 50 |
</div>
|
|
@@ -64,7 +64,7 @@ export default function SourceCard({ sources, onPageClick }: Props) {
|
|
| 64 |
{src.filename}
|
| 65 |
</span>
|
| 66 |
<Badge variant="outline" className="text-[9px] h-4 px-1.5">
|
| 67 |
-
Page {src.page}
|
| 68 |
</Badge>
|
| 69 |
<Badge
|
| 70 |
variant="secondary"
|
|
@@ -83,7 +83,7 @@ export default function SourceCard({ sources, onPageClick }: Props) {
|
|
| 83 |
variant="ghost"
|
| 84 |
size="sm"
|
| 85 |
className="h-6 px-2 text-[10px]"
|
| 86 |
-
onClick={() => onPageClick(src.page)}
|
| 87 |
>
|
| 88 |
<Eye className="w-3 h-3 mr-1" />
|
| 89 |
View
|
|
|
|
| 42 |
key={i}
|
| 43 |
variant="secondary"
|
| 44 |
className="text-[10px] h-5 cursor-pointer hover:bg-primary/20 transition-colors"
|
| 45 |
+
onClick={() => onPageClick(src.page + 1)}
|
| 46 |
>
|
| 47 |
+
p.{src.page + 1} • {src.confidence}%
|
| 48 |
</Badge>
|
| 49 |
))}
|
| 50 |
</div>
|
|
|
|
| 64 |
{src.filename}
|
| 65 |
</span>
|
| 66 |
<Badge variant="outline" className="text-[9px] h-4 px-1.5">
|
| 67 |
+
Page {src.page + 1}
|
| 68 |
</Badge>
|
| 69 |
<Badge
|
| 70 |
variant="secondary"
|
|
|
|
| 83 |
variant="ghost"
|
| 84 |
size="sm"
|
| 85 |
className="h-6 px-2 text-[10px]"
|
| 86 |
+
onClick={() => onPageClick(src.page + 1)}
|
| 87 |
>
|
| 88 |
<Eye className="w-3 h-3 mr-1" />
|
| 89 |
View
|