From 9453c1fc3a43c7a67cbbad800303d92b89448c75 Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Tue, 11 Oct 2022 00:39:15 +0100 Subject: [PATCH] return null if impersonating (#4939) --- packages/ui/TimezoneChangeDialog.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/ui/TimezoneChangeDialog.tsx b/packages/ui/TimezoneChangeDialog.tsx index 1caa49f1de..4ae9afa3b0 100644 --- a/packages/ui/TimezoneChangeDialog.tsx +++ b/packages/ui/TimezoneChangeDialog.tsx @@ -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 (