diff --git a/apps/web/pages/settings/admin.tsx b/apps/web/pages/settings/admin.tsx index d9a20e13c5..f92c434b0d 100644 --- a/apps/web/pages/settings/admin.tsx +++ b/apps/web/pages/settings/admin.tsx @@ -14,7 +14,7 @@ import Shell from "@components/Shell"; function AdminView() { const { t } = useLocale(); - const usernameRef = useRef(null!); + const usernameRef = useRef(null); return (
@@ -23,7 +23,7 @@ function AdminView() { className="mb-6 w-full sm:w-1/2" onSubmit={(e) => { e.preventDefault(); - const enteredUsername = usernameRef.current.value.toLowerCase(); + const enteredUsername = usernameRef.current?.value.toLowerCase(); signIn("impersonation-auth", { username: enteredUsername }).then((res) => { console.log(res); }); @@ -55,11 +55,9 @@ export default function Admin() { const { t } = useLocale(); return ( - - - - - + + + ); }