Sfoglia il codice sorgente

add term?: IWidgetTermCtl;

visuddhinanda 2 anni fa
parent
commit
128b63b718
1 ha cambiato i file con 10 aggiunte e 2 eliminazioni
  1. 10 2
      dashboard/src/components/template/QuoteLink.tsx

+ 10 - 2
dashboard/src/components/template/QuoteLink.tsx

@@ -1,5 +1,6 @@
 import { bookName as _bookName } from "../fts/book_name";
 import { ArticleCtl, TDisplayStyle } from "./Article";
+import { IWidgetTermCtl, TermCtl } from "./Term";
 
 interface IWidgetQuoteLinkCtl {
   type: string;
@@ -10,6 +11,7 @@ interface IWidgetQuoteLinkCtl {
   style: TDisplayStyle;
   book?: number;
   para?: number;
+  term?: IWidgetTermCtl;
 }
 const QuoteLinkCtl = ({
   type,
@@ -20,16 +22,22 @@ const QuoteLinkCtl = ({
   style,
   book,
   para,
+  term,
 }: IWidgetQuoteLinkCtl) => {
   const abbr = bookNameLocal
     ? bookNameLocal
     : _bookName.find((value) => value.term === bookName)?.abbr;
-  let textShow = `${abbr} ${volume}.${page}`;
+  let textShow = ` ${volume}.${page}`;
 
   return (
     <>
       <ArticleCtl
-        title={textShow}
+        title={
+          <>
+            <TermCtl {...term} compact={true} />
+            {textShow}
+          </>
+        }
         type={"page"}
         focus={book && para ? `${book}-${para}` : undefined}
         id={`${type}_${bookName}_${volume}_${page}`}