Skip to content

Commit

Permalink
use the correct text overlay variable
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopedro10 committed Nov 15, 2024
1 parent 5bff399 commit 19b5a8f
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/components/Search/OverlaySearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ const OverlaySearchResults = () => {
const { t } = useTranslation();
const dispatch = useDispatch();
const [nameSpace] = useAtom(currentNameSpace);
const { results, searchName, isFetching } = useAppSelector((state) => {
return {
results: [
state?.search?.searchOverlayResults?.personalities || [],
state?.search?.searchOverlayResults?.claims || [],
state?.search?.searchOverlayResults?.sentences || [],
],
searchName: state?.search?.searchInput || null,
isFetching: state?.search.isFetching,
};
});
const { results, searchOverlayName, isFetching } = useAppSelector(
(state) => {
return {
results: [
state?.search?.searchOverlayResults?.personalities || [],
state?.search?.searchOverlayResults?.claims || [],
state?.search?.searchOverlayResults?.sentences || [],
],
searchOverlayName: state?.search?.searchOverlayInput || null,
isFetching: state?.search.isFetching,
};
}
);

const handleSearchClick = ({
type,
Expand Down Expand Up @@ -84,7 +86,7 @@ const OverlaySearchResults = () => {
<SearchCard
title={t(`search:${type}HeaderTitle`)}
content={result}
searchName={searchName}
searchName={searchOverlayName}
handleSearchClick={handleSearchClick}
type={type}
avatar={i !== 0 ? false : true}
Expand Down

0 comments on commit 19b5a8f

Please sign in to comment.