return null if impersonating (#4939)

This commit is contained in:
Peer Richelsen
2022-10-10 17:39:15 -06:00
committed by GitHub
parent 47e496fded
commit 9453c1fc3a
+5
View File
@@ -1,3 +1,4 @@
import { useSession } from "next-auth/react";
import { useState, useEffect } from "react";
import dayjs from "@calcom/dayjs";
@@ -53,6 +54,10 @@ export default function TimezoneChangeDialog() {
toast && showToast(t("we_wont_show_again"), "success");
}
const { data } = useSession();
if (data?.user.impersonatedByUID) return null;
return (
<Dialog open={open} onOpenChange={setOpen}>
<DialogContent