dotcom-rendering
dotcom-rendering copied to clipboard
[BUG] Show / Hide container buttons sending wrong events to Ophan
The toggleContainer
function in the ShowHideContainers
component seems sets the data-link-name
attributes correctly but when clicking on the button on a front container, the click event looks like the opposite of what should happen ("Hide" sends event for "Show" and vice versa - see attached video).
https://github.com/guardian/dotcom-rendering/blob/037b0ceb7fbcbefcabc9d8ab53e24e348daa5cde/dotcom-rendering/src/components/ShowHideContainers.importable.tsx#L25-L46
https://github.com/guardian/dotcom-rendering/assets/43961396/68fde9a4-bbee-4f1b-981e-6aaef2886eb3