From 1ce0b0ff1f31c5a755a246f859c25d9763365a4c Mon Sep 17 00:00:00 2001 From: rudouglas Date: Fri, 11 Jun 2021 13:43:00 +0100 Subject: [PATCH] chore: adding NRBrowser and tidying --- src/components/Tabs/Bar.js | 18 ++++++++-- src/components/Tabs/BarItem.js | 23 +++++++++++-- src/pages/observability-packs.js | 57 ++++++++++++++++---------------- 3 files changed, 64 insertions(+), 34 deletions(-) diff --git a/src/components/Tabs/Bar.js b/src/components/Tabs/Bar.js index 76c1688d1..4c0b25400 100644 --- a/src/components/Tabs/Bar.js +++ b/src/components/Tabs/Bar.js @@ -2,17 +2,29 @@ import React from 'react'; import PropTypes from 'prop-types'; import useMobileDetect from 'use-mobile-detect-hook'; import { css } from '@emotion/react'; - +import { + useTessen, + useInstrumentedData, +} from '@newrelic/gatsby-theme-newrelic'; import useTabs from './useTabs'; const MobileTabControl = ({ children }) => { const [currentTab, setCurrentTab] = useTabs(); - + const tessen = useTessen(); + useInstrumentedData( + { actionName: 'oPackTabToggle', currentTab }, + { enabled: Boolean(currentTab) } + ); // eslint gets angry about using props from React.Children.map /* eslint-disable react/prop-types */ return (