Many Changes

This commit is contained in:
2024-05-14 12:49:50 +02:00
parent a01b6bdbc2
commit f6eef1ded3
53 changed files with 636 additions and 579 deletions

View File

@@ -1,12 +1,12 @@
'use client'
import { authenticate } from '@/app/lib/actions'
import { serverAttemptAuthenticateUser } from '@/app/lib/actions'
import { useFormState, useFormStatus } from "react-dom";
import { cookies } from 'next/headers';
export default function Page(state:any) {
const [loginResult, dispatch] = useFormState(authenticate, undefined)
const [loginResult, dispatch] = useFormState(serverAttemptAuthenticateUser, undefined)
console.log(dispatch);
console.log(state);

View File

@@ -1,5 +1,5 @@
import AdminPanel from "@/components/admin/adminPanel";
import AuthHandler from "@/components/admin/authHandler";
import AdminPanel from "@/components/client/admin/adminPanel";
import AuthHandler from "@/components/server/admin/authHandler";
import { cookies } from "next/headers";