Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const initVitalsLog = () => {
const reportVital = (data) => {
console.log(`${String.fromCodePoint(0x1f4c8)} ${data.name} : `, data);
};
console.log(
`${String.fromCodePoint(
0x1f4d1,
)} To get the final web vital numbers reported you maybe need to switch away and back to the tab`,
);
getCLS(reportVital);
getFID(reportVital);
getLCP(reportVital);
};
export function setupWebVitalsLog() {
const logWebVitalToBard = createWebVitalsBardReporter()
getTTFB(logWebVitalToBard)
getFCP(logWebVitalToBard)
getLCP(logWebVitalToBard)
getFID(logWebVitalToBard)
getCLS(logWebVitalToBard)
}