mirror of
https://github.com/20kaushik02/spotify-manager-web.git
synced 2026-01-25 16:14:06 +00:00
13 lines
349 B
TypeScript
13 lines
349 B
TypeScript
import { type MetricType, onCLS, onFCP, onLCP, onTTFB } from "web-vitals";
|
|
|
|
const reportWebVitals = (onPerfEntry?: (metric: MetricType) => void): void => {
|
|
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
onCLS(onPerfEntry);
|
|
onFCP(onPerfEntry);
|
|
onLCP(onPerfEntry);
|
|
onTTFB(onPerfEntry);
|
|
}
|
|
};
|
|
|
|
export default reportWebVitals;
|