Remove corpus counts from chat chrome
This commit is contained in:
@@ -40,6 +40,10 @@ const SECTION_LABELS: Record<string, string> = {
|
||||
thong_tin_quy_che: "Thông tin quy chế",
|
||||
};
|
||||
|
||||
export function citationSectionLabel(sectionType: string): string {
|
||||
return SECTION_LABELS[sectionType] ?? (sectionType.replace(/_/g, " ") || "Chuyên luận");
|
||||
}
|
||||
|
||||
export function CitationCard({
|
||||
citation,
|
||||
index,
|
||||
@@ -47,7 +51,7 @@ export function CitationCard({
|
||||
onSelect,
|
||||
className,
|
||||
}: CitationCardProps) {
|
||||
const sectionLabel = SECTION_LABELS[citation.sectionType] ?? citation.sectionType ?? "Chuyên luận";
|
||||
const sectionLabel = citationSectionLabel(citation.sectionType);
|
||||
const pageRangeText = citation.sourcePageRange
|
||||
? `Trang ${citation.sourcePageRange[0]}${
|
||||
citation.sourcePageRange[1] && citation.sourcePageRange[1] !== citation.sourcePageRange[0]
|
||||
|
||||
Reference in New Issue
Block a user