diff --git a/package.json b/package.json index 22bec17..9476705 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "react-router-dom": "^6.28.0", "react-scripts": "5.0.1", "typescript": "^5.7.3", - "web-vitals": "^2.1.0" + "web-vitals": "4.2.4" }, "scripts": { "start": "react-scripts start", diff --git a/src/reportWebVitals.ts b/src/reportWebVitals.ts index 49a2a16..ae4c739 100644 --- a/src/reportWebVitals.ts +++ b/src/reportWebVitals.ts @@ -1,6 +1,6 @@ -import { ReportHandler } from 'web-vitals'; +import { Metric } from 'web-vitals'; -const reportWebVitals = (onPerfEntry?: ReportHandler) => { +const reportWebVitals = (onPerfEntry?: Metric) => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); diff --git a/yarn.lock b/yarn.lock index 4a76cd7..3d0df87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9495,10 +9495,10 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" -web-vitals@^2.1.0: - version "2.1.4" - resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-2.1.4.tgz#76563175a475a5e835264d373704f9dde718290c" - integrity sha512-sVWcwhU5mX6crfI5Vd2dC4qchyTqxV8URinzt25XqVh+bHEPGH4C3NPrNionCP7Obx59wrYEbNlw4Z8sjALzZg== +web-vitals@4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-4.2.4.tgz#1d20bc8590a37769bd0902b289550936069184b7" + integrity sha512-r4DIlprAGwJ7YM11VZp4R884m0Vmgr6EAKe3P+kO0PPj3Unqyvv59rczf6UiGcb9Z8QxZVcqKNwv/g0WNdWwsw== webidl-conversions@^4.0.2: version "4.0.2"