added some components
This commit is contained in:
1 parent
f1f65138ea
commit
5920420f07
15 files changed
+1527
-63
No files matched your search
+21
-15
@@ -1,26 +1,30 @@
|
||||
import { AuthLayout } from '@/layouts/AuthLayout'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { useLogin } from '@/features/auth/hooks/useLogin'
|
||||
import { useState } from 'react'
|
||||
import { AuthLayout } from "@/layouts/AuthLayout";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { useLogin } from "@/features/auth/hooks/useLogin";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function LoginPage() {
|
||||
const [username, setUsername] = useState('')
|
||||
const [password, setPassword] = useState('')
|
||||
const { login, isLoading } = useLogin()
|
||||
const [username, setUsername] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
const { login, isLoading } = useLogin();
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault()
|
||||
login({ username, password })
|
||||
}
|
||||
e.preventDefault();
|
||||
login({ username, password });
|
||||
};
|
||||
|
||||
return (
|
||||
<AuthLayout>
|
||||
<div className="w-full max-w-md p-8 bg-[var(--bg-surface)] rounded-[var(--radius-lg)] shadow-[var(--shadow-lg)] border border-[var(--border-default)]">
|
||||
<h1 className="text-2xl font-bold text-[var(--text-primary)] mb-6 text-center">Login</h1>
|
||||
<h1 className="text-2xl font-bold text-[var(--text-primary)] mb-6 text-center">
|
||||
Login
|
||||
</h1>
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<label className="text-sm font-medium text-[var(--text-secondary)]">Username</label>
|
||||
<label className="text-sm font-medium text-[var(--text-secondary)]">
|
||||
Username
|
||||
</label>
|
||||
<Input
|
||||
value={username}
|
||||
onChange={(e) => setUsername(e.target.value)}
|
||||
@@ -29,7 +33,9 @@ export default function LoginPage() {
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<label className="text-sm font-medium text-[var(--text-secondary)]">Password</label>
|
||||
<label className="text-sm font-medium text-[var(--text-secondary)]">
|
||||
Password
|
||||
</label>
|
||||
<Input
|
||||
type="password"
|
||||
value={password}
|
||||
@@ -44,5 +50,5 @@ export default function LoginPage() {
|
||||
</form>
|
||||
</div>
|
||||
</AuthLayout>
|
||||
)
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user