Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function handleToggleCategory(title, expanded) {
trackEvent({
eventCategory: GA_EVENT_CATEGORY_SIDEBAR,
eventAction: 'toggle category',
eventLabel: title,
eventValue: Number(expanded),
})
}
function handleToggleAll(expanded) {
trackEvent({
eventCategory: GA_EVENT_CATEGORY_SIDEBAR,
eventAction: 'toggle all',
eventLabel: expanded ? 'expand' : 'collapse',
})
}
function handleHeadingClick(event) {
trackEvent({
eventCategory: 'Section Nav',
eventAction: 'heading click',
eventLabel: event.target.innerText,
})
}
{props.children}
)
}
versions.map(version => ({
text: getVersionLabel(version),
value: getVersionBasePath(version),
}))
)}