mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 18:20:17 +01:00
Cleaning
This commit is contained in:
@@ -1,13 +1,26 @@
|
||||
"use client";
|
||||
import { useState } from "react";
|
||||
import { useAdminConnexion } from '@/context/adminConnexionContext';
|
||||
import LoginForm from './components/loginForm';
|
||||
|
||||
export default function AdminLoginPage() {
|
||||
const {login, useProtect} = useAdminConnexion();
|
||||
const [value, setValue] = useState("");
|
||||
|
||||
useProtect();
|
||||
|
||||
function handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
setValue("");
|
||||
login(value);
|
||||
}
|
||||
|
||||
return (
|
||||
<LoginForm title="Admin login" placeholder="Admin password" buttonText={"Login"} onSubmit={login} />
|
||||
<div className="w-full h-full flex items-center justify-center">
|
||||
<form className="flex flex-col items-center gap-3 bg-white p-8 rounded-lg ring-1 ring-black" onSubmit={handleSubmit}>
|
||||
<h1 className="text-2xl font-bold text-center text-gray-700">Admin login</h1>
|
||||
<input name="team-id" className="w-60 h-12 text-center rounded ring-1 ring-inset ring-black placeholder:text-gray-400" placeholder="Admin password" value={value} onChange={(e) => setValue(e.target.value)}/>
|
||||
<button className=" w-40 h-12 bg-blue-600 hover:bg-blue-500 text-l text-white rounded ease-out duration-200" type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user