Skip to content

Commit

Permalink
Fix unused import, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed Dec 20, 2024
1 parent 833a429 commit 8cf5018
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 12 additions & 2 deletions packages/volto-slate-glossary/src/components/Tooltips.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import jwtDecode from 'jwt-decode';
Expand Down Expand Up @@ -60,7 +61,14 @@ const Tooltips = (props) => {
// Store texts and pathname in atom
setTooltippedTexts({ pathname: pathname, texts: texts });
}
}, [blocks, blocks_layout, glossaryterms, pathname, setTooltippedTexts]);
}, [
blocks,
blocks_layout,
description,
glossaryterms,
pathname,
setTooltippedTexts,
]);

return <div className="hidden-AppExtras-CalculateTexts"></div>;
};
Expand Down Expand Up @@ -184,7 +192,9 @@ export const enhanceTextWithTooltips = (text, remainingGlossaryterms) => {
definition = `<ol>${arrayOfListNodes}</ol>`;
}
const TooltipPopup = config.getComponent('TooltipPopup').component;
return <TooltipPopup term={el.val} definition={definition} idx={j} />;
return (
<TooltipPopup term={el.val} definition={definition} idx={j} key={j} />
);
}
}),
matchOnlyFirstOccurence
Expand Down
1 change: 0 additions & 1 deletion packages/volto-slate-glossary/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import TermView from './components/TermView';
import { glossarytermsReducer, glossarytooltiptermsReducer } from './reducers';
import { TextWithGlossaryTooltips } from './utils';
import { FetchTooltipTerms } from './components/Tooltips';
import DescriptionBlockView from './components/DescriptionBlockView';
import TooltipPopup from './components/TooltipPopup';

const applyConfig = (config) => {
Expand Down

0 comments on commit 8cf5018

Please sign in to comment.