From 33a56c1723726d6dc5a08a06cb67210cd8a4a2ed Mon Sep 17 00:00:00 2001 From: Ian Schmitz Date: Sat, 20 Jun 2020 13:27:04 -0700 Subject: [PATCH] Bump version of Verdaccio (#7787) --- docusaurus/docs/measuring-performance.md | 4 ++-- packages/cra-template/template/src/reportWebVitals.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docusaurus/docs/measuring-performance.md b/docusaurus/docs/measuring-performance.md index b7310c531c9..a41635cbe40 100644 --- a/docusaurus/docs/measuring-performance.md +++ b/docusaurus/docs/measuring-performance.md @@ -49,7 +49,7 @@ reportWebVitals(sendToAnalytics); > **Note:** If you use Google Analytics, use the `id` value to make it easier to construct metric distributions manually (to calculate percentiles, etc…). > > ```js -> function sendToAnalytics({id, name, value}) { +> function sendToAnalytics({ id, name, value }) { > ga('send', 'event', { > eventCategory: 'Web Vitals', > eventAction: name, @@ -58,7 +58,7 @@ reportWebVitals(sendToAnalytics); > nonInteraction: true, // avoids affecting bounce rate > }); > } -> +> > reportWebVitals(sendToAnalytics); > ``` > diff --git a/packages/cra-template/template/src/reportWebVitals.js b/packages/cra-template/template/src/reportWebVitals.js index 436ab8df817..5253d3ad9e6 100644 --- a/packages/cra-template/template/src/reportWebVitals.js +++ b/packages/cra-template/template/src/reportWebVitals.js @@ -1,13 +1,13 @@ -const reportWebVitals = (onPerfEntry) => { +const reportWebVitals = onPerfEntry => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); + getCLS(onPerfEntry); getFID(onPerfEntry); getFCP(onPerfEntry); getLCP(onPerfEntry); getTTFB(onPerfEntry); }); } -} +}; export default reportWebVitals;