Skip to content

Commit e70a836

Browse files
committed
changes in login and register form
1 parent 28b8e55 commit e70a836

File tree

2 files changed

+2
-199
lines changed

2 files changed

+2
-199
lines changed

src/components/auth/LoginForm.jsx

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -41,88 +41,6 @@ const LoginForm = () => {
4141
)
4242
:
4343
(
44-
// <div className="flex min-h-full flex-1 flex-col justify-center px-6 py-12 lg:px-8">
45-
// <div className="sm:mx-auto sm:w-full sm:max-w-sm">
46-
// <h2 className="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900">
47-
// Sign in
48-
// </h2>
49-
// </div>
50-
// <div className="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
51-
// <form onSubmit={(e) => handleLogin(e)} className="space-y-6" >
52-
// <div>
53-
// <label htmlFor="email" className="block text-sm font-medium leading-6 text-gray-900">
54-
// Email address
55-
// </label>
56-
// <div className="mt-2">
57-
// <input
58-
// disabled={loading && true}
59-
// id="email"
60-
// name="email"
61-
// type="email"
62-
// placeholder='Email'
63-
// autoComplete="email"
64-
// onChange={(e) => setData({ ...data, email: e.target.value })}
65-
// required
66-
// className="block w-full px-2 rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
67-
// />
68-
// </div>
69-
// </div>
70-
71-
// <div>
72-
// <div className="flex items-center justify-between">
73-
// <label htmlFor="password" className="block text-sm font-medium leading-6 text-gray-900">
74-
// Password
75-
// </label>
76-
// <div onClick={(e) => router.push('/forget-password')} className="text-sm">
77-
// <Link href="/forget-password" className="font-semibold text-indigo-600 hover:text-indigo-500">
78-
// Forgot password?
79-
// </Link>
80-
// </div>
81-
// </div>
82-
// <div className="mt-2">
83-
// <input
84-
// disabled={loading && true}
85-
// id="password"
86-
// name="password"
87-
// type="password"
88-
// placeholder='Password'
89-
// autoComplete="current-password"
90-
// onChange={(e) => setData({ ...data, password: e.target.value })}
91-
// required
92-
// className="block w-full px-2 rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
93-
// />
94-
// </div>
95-
// </div>
96-
97-
// <div>
98-
// <button
99-
// disabled={loading && true}
100-
// type="submit"
101-
// className="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
102-
// >
103-
// {
104-
// loading ? 'Signing in..' : 'Sign in'
105-
// }
106-
// </button>
107-
// </div>
108-
// <div>
109-
// <button onClick={() => signIn('google')} type="button" className="text-white w-full bg-[#4285F4] hover:bg-[#4285F4]/90 focus:ring-4 focus:outline-none focus:ring-[#4285F4]/50 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center justify-between dark:focus:ring-[#4285F4]/55 mr-2 mb-2">
110-
// <svg className="mr-2 -ml-1 w-4 h-4" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="google" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 488 512"><path fill="currentColor" d="M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"></path></svg>
111-
// Sign in with Google
112-
// <div>
113-
// </div>
114-
// </button>
115-
// </div>
116-
// </form>
117-
118-
// <p className="mt-10 text-center text-sm text-gray-500">
119-
// Not a member?{' '}
120-
// <Link href="/register" className="font-semibold leading-6 text-indigo-600 hover:text-indigo-500">
121-
// Register
122-
// </Link>
123-
// </p>
124-
// </div>
125-
// </div>
12644
<section>
12745
<div className="flex items-center justify-center px-4 py-10 sm:px-6 sm:py-16 lg:px-8 lg:py-24">
12846
<div className="xl:mx-auto xl:w-full xl:max-w-sm 2xl:max-w-md">

src/components/auth/RegisterForm.jsx

Lines changed: 2 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -79,121 +79,6 @@ const RegisterForm = () => {
7979
)
8080
:
8181
(
82-
// <div className="flex min-h-full flex-1 flex-col justify-center px-6 py-12 lg:px-8">
83-
// <div className="sm:mx-auto sm:w-full sm:max-w-sm">
84-
// <h2 className="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900">
85-
// Register
86-
// </h2>
87-
// </div>
88-
// <div className="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
89-
// <form onSubmit={(e) => handleRegister(e)} className="space-y-6">
90-
// <div>
91-
// <label htmlFor="name" className="block text-sm font-medium leading-6 text-gray-900">
92-
// Your name
93-
// </label>
94-
// <div className="mt-2">
95-
// <input
96-
// disabled={loading && true}
97-
// id="name"
98-
// name="name"
99-
// type="name"
100-
// placeholder='Enter your name.'
101-
// autoComplete="name"
102-
// onChange={(e) => setData({ ...data, name: e.target.value })}
103-
// required
104-
// className="block w-full px-2 rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
105-
// />
106-
// </div>
107-
// </div>
108-
109-
// <div>
110-
// <label htmlFor="email" className="block text-sm font-medium leading-6 text-gray-900">
111-
// Email address
112-
// </label>
113-
// <div className="mt-2">
114-
// <input
115-
// disabled={loading && true}
116-
// id="email"
117-
// name="email"
118-
// type="email"
119-
// placeholder='Enter your email.'
120-
// autoComplete="email"
121-
// onChange={(e) => setData({ ...data, email: e.target.value })}
122-
// required
123-
// className="block px-2 w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
124-
// />
125-
// </div>
126-
// </div>
127-
128-
// <div>
129-
// <div className="flex items-center justify-between">
130-
// <label htmlFor="password" className="block text-sm font-medium leading-6 text-gray-900">
131-
// Password
132-
// </label>
133-
// </div>
134-
// <div className="mt-2">
135-
// <input
136-
// disabled={loading && true}
137-
// id="password"
138-
// name="password"
139-
// type="password"
140-
// placeholder='Enter your password.'
141-
// autoComplete="current-password"
142-
// onChange={(e) => setData({ ...data, password: e.target.value })}
143-
// required
144-
// className="block w-full px-2 rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
145-
// />
146-
// </div>
147-
// {
148-
// data?.password && data.password.length < 6 && <p className="text-xs text-red-500 mt-2">password must be 6 characters long.</p>
149-
// }
150-
// </div>
151-
152-
// <div className="flex items-center mb-2">
153-
// <input
154-
// type='number'
155-
// placeholder="Enter OTP"
156-
// required
157-
// onChange={(e) => setData({ ...data, otp: e.target.value })}
158-
// className="w-full border rounded-lg px-3 py-2 focus:outline-none focus:border-blue-500"
159-
// />
160-
// <div
161-
// className="bg-green-500 text-white py-1 px-3 rounded-lg ml-2 transition-transform transform active:scale-95 cursor-pointer"
162-
// onClick={() => emailLoading ? null : sendOtp()}
163-
// >
164-
// {emailLoading ? 'Sending..' : 'Send'}
165-
// </div>
166-
// </div>
167-
168-
// <div>
169-
// <button
170-
// disabled={loading && true}
171-
// type="submit"
172-
// className="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
173-
// >
174-
// {
175-
// loading ? 'Registering..' : ' Register'
176-
// }
177-
// </button>
178-
// </div>
179-
// <div>
180-
// <button onClick={() => signIn('google')} type="button" className="text-white w-full bg-[#4285F4] hover:bg-[#4285F4]/90 focus:ring-4 focus:outline-none focus:ring-[#4285F4]/50 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center justify-between dark:focus:ring-[#4285F4]/55 mr-2 mb-2">
181-
// <svg className="mr-2 -ml-1 w-4 h-4" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="google" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 488 512"><path fill="currentColor" d="M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"></path></svg>
182-
// Sign up with Google
183-
// <div>
184-
// </div>
185-
// </button>
186-
// </div>
187-
// </form>
188-
189-
// <p className="mt-10 text-center text-sm text-gray-500">
190-
// Already a member?{' '}
191-
// <Link href="/login" className="font-semibold leading-6 text-indigo-600 hover:text-indigo-500">
192-
// Sign in
193-
// </Link>
194-
// </p>
195-
// </div>
196-
// </div>
19782
<section>
19883
<div className="flex items-center justify-center px-4 py-10 sm:px-6 sm:py-16 lg:px-8 lg:py-24">
19984
<div className="xl:mx-auto xl:w-full xl:max-w-sm 2xl:max-w-md">
@@ -279,10 +164,10 @@ const RegisterForm = () => {
279164
placeholder="Enter OTP"
280165
required
281166
onChange={(e) => setData({ ...data, otp: e.target.value })}
282-
className="w-full border rounded-lg px-3 py-2 focus:outline-none focus:border-blue-500"
167+
className="flex h-10 w-full rounded-md border border-gray-300 bg-transparent px-3 py-2 text-sm placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-gray-400 focus:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50"
283168
/>
284169
<div
285-
className="bg-green-500 text-white py-1 px-3 rounded-lg ml-2 transition-transform transform active:scale-95 cursor-pointer"
170+
className="bg-black/80 hover:bg-black text-white py-1 px-3 rounded-lg ml-2 transition-transform transform active:scale-95 cursor-pointer"
286171
onClick={() => emailLoading ? null : sendOtp()}
287172
>
288173
{emailLoading ?

0 commit comments

Comments
 (0)