Initialize project using Create React App

This commit is contained in:
Nicholas Orlowsky 2022-02-03 17:58:40 -06:00
commit 7fd7556f5c
No known key found for this signature in database
GPG key ID: DA69F4D62590FB49
20 changed files with 27750 additions and 0 deletions

15
src/reportWebVitals.ts Normal file
View file

@ -0,0 +1,15 @@
import { ReportHandler } from 'web-vitals';
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
export default reportWebVitals;