Skip to content

Commit

Permalink
Updated the Chat.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
DevMarkson authored Sep 16, 2024
1 parent bf273b9 commit c2c6713
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions src/components/Chat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,27 +115,27 @@ const Chat = () => {
);
}}
>
<p>How do I register a trademark in USA</p>
<p>How do I register a trademark in USA?</p>
</div>
<div
className="question"
onClick={() => {
handlePredefinedQuestionClick(
"How do I register an Industrial act in Nigeria?"
"How do I register an Industrial design in Nigeria?"
);
}}
>
<p>How do I register an Industrial act in Nigeria?</p>
<p>How do I register an Industrial design in Nigeria?</p>
</div>
<div
className="question"
onClick={() => {
handlePredefinedQuestionClick(
"What is the duration of Copyright in the UK?"
"What is the duration of Copyright in the United Kingdom?"
);
}}
>
<p>What is the duration of Copyright in the UK</p>
<p>What is the duration of Copyright in the United Kingdom?</p>
</div>
</div>
</div>
Expand Down Expand Up @@ -170,11 +170,12 @@ const Chat = () => {
)}
</p>

{entry.citations.length > 0 && (
{/* Only show citations if they exist */}
{entry.citations && entry.citations.length > 0 && (
<>
<h4 style={{ marginTop: "15px" }}>Citation:</h4>
{entry.citations.map((citation, index) => {
return (
{entry.citations.map(
(citation, index) =>
entry.response.includes(`[${index + 1}]`) && (
<div className="citation" key={index}>
<a
Expand All @@ -186,21 +187,9 @@ const Chat = () => {
</a>
</div>
)
);
})}
)}
</>
)}

{/* <div className="citation">
<span>Citation:</span>
<a
href={entry.citations[0].pdf_link}
target="_blank"
rel="noreferrer"
>
1. {entry.citations[0].title}
</a>
</div> */}
</div>
</div>
);
Expand Down

0 comments on commit c2c6713

Please sign in to comment.