Skip to content

Commit 966e520

Browse files
authored
Fix Source links in Ask AI not navigating to the page (#2375)
1 parent 1270293 commit 966e520

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/components/Search/SearchAskAnswer.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,6 @@ function AnswerBody(props: { answer: AskAnswerResult }) {
137137
const { answer } = props;
138138
const language = useLanguage();
139139

140-
const [, setSearchState] = useSearch();
141-
const onClose = () => {
142-
setSearchState(null);
143-
};
144-
145140
return (
146141
<>
147142
<div
@@ -158,7 +153,6 @@ function AnswerBody(props: { answer: AskAnswerResult }) {
158153
hasAnswer={answer.hasAnswer}
159154
sources={answer.sources}
160155
language={language}
161-
onClose={onClose}
162156
/>
163157
) : null}
164158
</>
@@ -212,10 +206,9 @@ function AnswerFollowupQuestions(props: { followupQuestions: string[] }) {
212206
function AnswerSources(props: {
213207
sources: AskAnswerSource[];
214208
language: TranslationLanguage;
215-
onClose: () => void;
216209
hasAnswer?: boolean;
217210
}) {
218-
const { sources, onClose, language, hasAnswer } = props;
211+
const { sources, language, hasAnswer } = props;
219212

220213
return (
221214
<div
@@ -238,7 +231,6 @@ function AnswerSources(props: {
238231
{sources.map((source) => (
239232
<span key={source.id} className={tcls()}>
240233
<Link
241-
onClick={onClose}
242234
className={tcls(
243235
'flex',
244236
'text-sm',

0 commit comments

Comments
 (0)