diff --git a/src/ui/atoms/LoginButton.tsx b/src/ui/atoms/LoginButton.tsx new file mode 100644 index 000000000..2bffb37e5 --- /dev/null +++ b/src/ui/atoms/LoginButton.tsx @@ -0,0 +1,16 @@ +"use client"; + +import { useFormStatus } from "react-dom"; + +export const LoginButton = () => { + const { pending } = useFormStatus(); + return ( + + ); +}; diff --git a/src/ui/components/LoginForm.tsx b/src/ui/components/LoginForm.tsx index ee3538581..bd1fb2043 100644 --- a/src/ui/components/LoginForm.tsx +++ b/src/ui/components/LoginForm.tsx @@ -1,10 +1,11 @@ +import { LoginButton } from "@/ui/atoms/LoginButton"; import { getServerAuthClient } from "@/app/config"; export async function LoginForm() { return (
{ "use server"; @@ -25,21 +26,18 @@ export async function LoginForm() { } }} > -
- +
-
- + +
- - + + -
); } diff --git a/src/ui/components/nav/components/UserMenu/UserMenu.tsx b/src/ui/components/nav/components/UserMenu/UserMenu.tsx index 13c630ddf..bedf29563 100644 --- a/src/ui/components/nav/components/UserMenu/UserMenu.tsx +++ b/src/ui/components/nav/components/UserMenu/UserMenu.tsx @@ -49,12 +49,12 @@ export function UserMenu({ user }: Props) {
{({ active }) => ( -
+