Debugging prod

pull/3545/head
zomars 2022-07-26 17:43:13 -06:00
parent 4b428d22de
commit 39364d8476
2 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,7 @@ const querySchema = z.object({
export default function Bookings() {
const router = useRouter();
console.log("router", JSON.stringify(router));
const { status } = router.isReady ? querySchema.parse(router.query) : { status: "upcoming" as const };
const { t } = useLocale();

View File

@ -9,7 +9,8 @@ export const perfObserver =
new PerformanceObserver((items) => {
items.getEntries().forEach((entry) => {
// Log entry duration in seconds with four decimal places.
console.log(entry.name.replace("$1", `${(entry.duration / 1000.0).toFixed(4)}s`));
if (!!process.env.NEXT_PUBLIC_DEBUG)
console.log(entry.name.replace("$1", `${(entry.duration / 1000.0).toFixed(4)}s`));
});
});