mirror of
https://github.com/20kaushik02/spotify-manager-web.git
synced 2026-01-25 16:14:06 +00:00
typescript! yay! (pain.)
This commit is contained in:
12
src/reportWebVitals.ts
Normal file
12
src/reportWebVitals.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user