import { signIn } from "next-auth/react"; import { useRef } from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button, Meta, TextField } from "@calcom/ui"; import { getLayout } from "@components/auth/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 }); }}>
{process.env.NEXT_PUBLIC_WEBSITE_URL}/} ref={usernameRef} hint={t("impersonate_user_tip")} defaultValue={undefined} />
); } AdminView.getLayout = getLayout; export default AdminView;