import { signIn } from "next-auth/react"; import { useRef } from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import Button from "@calcom/ui/Button"; import { TextField } from "@calcom/ui/form/fields"; import Meta from "@calcom/ui/v2/core/Meta"; import { getLayout } from "@calcom/ui/v2/core/layouts/AdminLayout"; function AdminView() { const { t } = useLocale(); const usernameRef = useRef(null); return ( <>
{ e.preventDefault(); const enteredUsername = usernameRef.current?.value.toLowerCase(); signIn("impersonation-auth", { username: enteredUsername }).then((res) => { console.log(res); }); }}> {process.env.NEXT_PUBLIC_WEBSITE_URL}/ } ref={usernameRef} defaultValue={undefined} />

{t("impersonate_user_tip")}

); } AdminView.getLayout = getLayout; export default AdminView;