return null if impersonating (#4939)
parent
47e496fded
commit
9453c1fc3a
|
@ -1,3 +1,4 @@
|
||||||
|
import { useSession } from "next-auth/react";
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
|
|
||||||
import dayjs from "@calcom/dayjs";
|
import dayjs from "@calcom/dayjs";
|
||||||
|
@ -53,6 +54,10 @@ export default function TimezoneChangeDialog() {
|
||||||
toast && showToast(t("we_wont_show_again"), "success");
|
toast && showToast(t("we_wont_show_again"), "success");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { data } = useSession();
|
||||||
|
|
||||||
|
if (data?.user.impersonatedByUID) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogContent
|
<DialogContent
|
||||||
|
|
Loading…
Reference in New Issue