summaryrefslogtreecommitdiff
path: root/src/components/Login2.tsx
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-05-21 14:00:28 +0700
committerpolwex <polwex@sortug.com>2025-05-21 14:00:28 +0700
commite839a5f61f0faa21ca8b4bd5767f7575d5e576ee (patch)
tree53e5bcc3977b6ebef687521a7ac387a89aeb21c8 /src/components/Login2.tsx
parent4f2bd597beaa778476b84c10b571db1b13524301 (diff)
the card flip animation is legit
Diffstat (limited to 'src/components/Login2.tsx')
-rw-r--r--src/components/Login2.tsx22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/components/Login2.tsx b/src/components/Login2.tsx
index ef3a603..6c26efc 100644
--- a/src/components/Login2.tsx
+++ b/src/components/Login2.tsx
@@ -11,19 +11,9 @@ import {
CardFooter,
CardTitle,
} from "@/components/ui/card";
-import {
- Form,
- FormControl,
- FormDescription,
- FormField,
- FormItem,
- FormLabel,
- FormMessage,
-} from "@/components/ui/form";
import { Label } from "@/components/ui/label";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
-import { useRouter } from "waku";
export default function AuthScreen() {
const [isReg, setReg] = useState(false);
@@ -52,15 +42,17 @@ function OOldform({ isReg, toggle }: { isReg: boolean; toggle: () => void }) {
else setStrings(logstrings);
}, [isReg]);
+ // const [state, formAction, isPending] = useActionState<FormState, FormData>(
+ // isReg ? postRegister : postLogin,
+ // { error: "" },
+ // "/login",
+ // );
const [state, formAction, isPending] = useActionState<FormState, FormData>(
- isReg ? postRegister : postLogin,
+ postLogin,
{ error: "" },
"/login",
);
- // const nav = useRouter();
- // useEffect(() => {
- // if (state.success) nav.replace("/");
- // }, [state]);
+ console.log({ state });
return (
<form action={formAction}>
<div className="flex flex-col gap-6">