Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions src/js/components/glossary/definition/GlossaryDefinition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,7 @@ const GlossaryDefinition = ({ glossary }) => {
const handleShareDispatch = (url) => {
dispatch(showModal(url));
};
// preserving in case it is needed
// let copyConfirmation = null;

// const getCopyFn = () => {
// const separator = window.location.href.includes('?') ? '&' : '?';
// const slug = `${separator}glossary=${props.glossary.term.toJS().slug}`;
// const value = window.location.href.includes("glossary") ? window.location.href : window.location.href + slug;
// if (window.navigator && window.navigator.clipboard && window.navigator.clipboard.writeText) {
// window.navigator.clipboard.writeText(value);
// setShowCopiedConfirmation(true);
// copyConfirmation = window.setTimeout(() => {
// setShowCopiedConfirmation(false);
// }, 1750);
// }
// };
// useEffect(() => window.clearTimeout(copyConfirmation), []);



const checkDefinitions = () => {
let hasPlainLocal = false;
let hasOfficialLocal = false;
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/sharedComponents/AboutTheDataLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ const AboutTheDataLink = ({ slug, children }) => {
// there is already a search query
if (search && !search.includes('about-the-data')) {
// url with original search &about-the-data={term}
newUrl = `${pathname}${search}&about-the-data=${entry.slug}`;
newUrl = `${pathname}${search}`;
}
else {
// url with search term as query
newUrl = getNewUrlForGlossary(
pathname, `?about-the-data=${entry.slug}`, urlSearchParam
pathname, urlSearchParam
);
}

Expand Down
3 changes: 2 additions & 1 deletion src/js/components/sharedComponents/GlossaryLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ const GlossaryLink = ({
const { pathname, search } = useLocation();
const params = new URLSearchParams(search);
params.set('glossary', term)
const glossaryUrl = `${pathname}?${params.toString()}`
const glossaryUrl = `${pathname}`

const stopBubble = (e) => {
e.preventDefault();
e.stopPropagation();
showSlideout('glossary', { url: term });
};
Expand Down
Loading