diff --git a/src/components/CustomSearch/CompleteSearchSummary.jsx b/src/components/CustomSearch/CompleteSearchSummary.jsx index e08225c..d61a0bb 100644 --- a/src/components/CustomSearch/CompleteSearchSummary.jsx +++ b/src/components/CustomSearch/CompleteSearchSummary.jsx @@ -51,7 +51,7 @@ export default function CompleteSearchSummary({ search }) { const searchType = search.searchType === "em2lm" ? "LM" : "EM"; - function copyAlignment() { + const copyAlignment = () => { setIsCopying(true); API.post("SearchAPI", "/copy_alignment", { body: { @@ -65,13 +65,11 @@ export default function CompleteSearchSummary({ search }) { } const searchMessage = search.errorMessage ? ( - <> - - Search - failed.
- Please try again. -
- + + Search + failed.
+ Please try again. +
) : ( {search.nTotalMatches} {searchType} matches diff --git a/src/components/CustomSearch/CompleteStep.jsx b/src/components/CustomSearch/CompleteStep.jsx index 82e5d21..fbffb54 100644 --- a/src/components/CustomSearch/CompleteStep.jsx +++ b/src/components/CustomSearch/CompleteStep.jsx @@ -6,6 +6,16 @@ import StepTitle from "./StepTitle"; export default function CompleteStep({ state, matches, resultsUrl }) { let content = ""; + + const handleView = () => { + if (Object.prototype.hasOwnProperty.call(window, 'fathom')) { + // make sure the fathom code has been loaded and not blocked by an ad blocker. + if (window.fathom) { + window.fathom.trackGoal('view complete results', 0); + } + } + }; + if (["complete"].includes(state)) { content = ( <> @@ -21,7 +31,7 @@ export default function CompleteStep({ state, matches, resultsUrl }) { > {matches} matches found -