import { signIn } from "next-auth/react"; import { useRef } from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button, getAdminLayout as getLayout, Meta, TextField } from "@calcom/ui"; function AdminView() { const { t } = useLocale(); const usernameRef = useRef(null); return ( <>
{ e.preventDefault(); const enteredUsername = usernameRef.current?.value.toLowerCase(); signIn("impersonation-auth", { username: enteredUsername }); }}>
{process.env.NEXT_PUBLIC_WEBSITE_URL}/} ref={usernameRef} hint={t("impersonate_user_tip")} defaultValue={undefined} />
); } AdminView.getLayout = getLayout; export default AdminView;