Skip to content

Commit

Permalink
fix: Upgrade api of web-vitals to reflect to version of 4.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
phantomjinx committed Oct 3, 2024
1 parent 7ffb1ae commit bae0273
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
16 changes: 8 additions & 8 deletions packages/kubernetes-api-app/src/reportWebVitals.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ReportHandler } from 'web-vitals'
import { MetricType } from 'web-vitals'

export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
export const reportWebVitals = (onPerfEntry?: (metric: MetricType) => void) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry)
getFID(onPerfEntry)
getFCP(onPerfEntry)
getLCP(onPerfEntry)
getTTFB(onPerfEntry)
import('web-vitals').then(({ onCLS, onFID, onFCP, onLCP, onTTFB }) => {
onCLS(onPerfEntry)
onFID(onPerfEntry)
onFCP(onPerfEntry)
onLCP(onPerfEntry)
onTTFB(onPerfEntry)
})
}
}
16 changes: 8 additions & 8 deletions packages/management-api-app/src/reportWebVitals.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ReportHandler } from 'web-vitals'
import { MetricType } from 'web-vitals'

export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
export const reportWebVitals = (onPerfEntry?: (metric: MetricType) => void) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry)
getFID(onPerfEntry)
getFCP(onPerfEntry)
getLCP(onPerfEntry)
getTTFB(onPerfEntry)
import('web-vitals').then(({ onCLS, onFID, onFCP, onLCP, onTTFB }) => {
onCLS(onPerfEntry)
onFID(onPerfEntry)
onFCP(onPerfEntry)
onLCP(onPerfEntry)
onTTFB(onPerfEntry)
})
}
}
16 changes: 8 additions & 8 deletions packages/oauth-app/src/reportWebVitals.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ReportHandler } from 'web-vitals'
import { MetricType } from 'web-vitals'

export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
export const reportWebVitals = (onPerfEntry?: (metric: MetricType) => void) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry)
getFID(onPerfEntry)
getFCP(onPerfEntry)
getLCP(onPerfEntry)
getTTFB(onPerfEntry)
import('web-vitals').then(({ onCLS, onFID, onFCP, onLCP, onTTFB }) => {
onCLS(onPerfEntry)
onFID(onPerfEntry)
onFCP(onPerfEntry)
onLCP(onPerfEntry)
onTTFB(onPerfEntry)
})
}
}
16 changes: 8 additions & 8 deletions packages/online-shell/src/reportWebVitals.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ReportHandler } from 'web-vitals'
import { MetricType } from 'web-vitals'

export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
export const reportWebVitals = (onPerfEntry?: (metric: MetricType) => void) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry)
getFID(onPerfEntry)
getFCP(onPerfEntry)
getLCP(onPerfEntry)
getTTFB(onPerfEntry)
import('web-vitals').then(({ onCLS, onFID, onFCP, onLCP, onTTFB }) => {
onCLS(onPerfEntry)
onFID(onPerfEntry)
onFCP(onPerfEntry)
onLCP(onPerfEntry)
onTTFB(onPerfEntry)
})
}
}

0 comments on commit bae0273

Please sign in to comment.