return null if impersonating (#4939)

pull/4940/head
Peer Richelsen 2022-10-11 00:39:15 +01:00 committed by GitHub
parent 47e496fded
commit 9453c1fc3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

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