diff --git a/apps/hackathon/src/app/auth/forgot-password/page.tsx b/apps/hackathon/src/app/auth/forgot-password/page.tsx index 7f9fe22..b28aacc 100644 --- a/apps/hackathon/src/app/auth/forgot-password/page.tsx +++ b/apps/hackathon/src/app/auth/forgot-password/page.tsx @@ -3,6 +3,7 @@ import { supabase } from '@imphnen-frontend-service/service'; import { Link, useNavigate } from 'react-router'; import { toast } from 'sonner'; import { Icon } from '@iconify/react'; +import ThemeToggle from '../../../components/theme-toggle'; export default function ForgotPasswordPage() { const [email, setEmail] = useState(''); @@ -80,13 +81,23 @@ export default function ForgotPasswordPage() { } return ( -
-
+
+
+
+ + +
-

+

Forgot Password?

-

+

No worries, we'll send you reset instructions

@@ -95,7 +106,7 @@ export default function ForgotPasswordPage() {
@@ -106,7 +117,7 @@ export default function ForgotPasswordPage() { onChange={(e) => setEmail(e.target.value)} placeholder="your@email.com" disabled={isLoading} - className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed" + className="bg-white dark:bg-gray-800 w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed" required />
@@ -119,16 +130,6 @@ export default function ForgotPasswordPage() { {isLoading ? 'Sending...' : 'Send Reset Link'} - -
- - - Back to Login - -
); diff --git a/apps/hackathon/src/app/auth/login/page.tsx b/apps/hackathon/src/app/auth/login/page.tsx index 4d6bfdd..87f4ca3 100644 --- a/apps/hackathon/src/app/auth/login/page.tsx +++ b/apps/hackathon/src/app/auth/login/page.tsx @@ -115,8 +115,8 @@ export default function LoginPage() { }; return ( -
-
+
+
@@ -147,7 +147,7 @@ export default function LoginPage() {
@@ -158,7 +158,7 @@ export default function LoginPage() { onChange={(e) => setEmail(e.target.value)} placeholder="your@email.com" disabled={isEmailLoading} - className="w-full px-4 py-2.5 border border-gray-300 dark:border-neutral-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-neutral-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-neutral-500 disabled:bg-gray-100 dark:disabled:bg-neutral-700 disabled:cursor-not-allowed" + className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed" required />
@@ -167,7 +167,7 @@ export default function LoginPage() {
@@ -185,7 +185,7 @@ export default function LoginPage() { onChange={(e) => setPassword(e.target.value)} placeholder="••••••••" disabled={isEmailLoading} - className="w-full px-4 py-2.5 border border-gray-300 dark:border-neutral-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-neutral-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-neutral-500 disabled:bg-gray-100 dark:disabled:bg-neutral-700 disabled:cursor-not-allowed" + className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed" required />
@@ -193,23 +193,25 @@ export default function LoginPage() {
-
- OR -
+
+ + OR + +
-

+

Don't have an account?{' '}

diff --git a/apps/hackathon/src/app/auth/reset-password/page.tsx b/apps/hackathon/src/app/auth/reset-password/page.tsx index 11a882d..905917b 100644 --- a/apps/hackathon/src/app/auth/reset-password/page.tsx +++ b/apps/hackathon/src/app/auth/reset-password/page.tsx @@ -10,17 +10,17 @@ export default function ResetPasswordPage() { const [isLoading, setIsLoading] = useState(false); const [isValidToken, setIsValidToken] = useState(false); - useEffect(() => { - // Check if we have a valid session (from the reset link) - supabase.auth.getSession().then(({ data: { session } }) => { - if (session) { - setIsValidToken(true); - } else { - toast.error('Invalid or expired reset link'); - setTimeout(() => navigate('/auth/forgot-password'), 2000); - } - }); - }, [navigate]); + // useEffect(() => { + // // Check if we have a valid session (from the reset link) + // supabase.auth.getSession().then(({ data: { session } }) => { + // if (session) { + // setIsValidToken(true); + // } else { + // toast.error('Invalid or expired reset link'); + // setTimeout(() => navigate('/auth/forgot-password'), 2000); + // } + // }); + // }, [navigate]); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); @@ -59,32 +59,36 @@ export default function ResetPasswordPage() { } }; - if (!isValidToken) { - return ( -
-
-
-

Verifying reset link...

-
-
- ); - } + // if (!isValidToken) { + // return ( + //
+ //
+ //
+ //

+ // Verifying reset link... + //

+ //
+ //
+ // ); + // } return ( -
-
+
+
-

+

Set New Password

-

Enter your new password below

+

+ Enter your new password below +

@@ -95,7 +99,7 @@ export default function ResetPasswordPage() { onChange={(e) => setPassword(e.target.value)} placeholder="••••••••" disabled={isLoading} - className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed" + className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed bg-white dark:bg-gray-800 text-gray-900 dark:text-white" required minLength={6} /> @@ -104,7 +108,7 @@ export default function ResetPasswordPage() {
@@ -115,7 +119,7 @@ export default function ResetPasswordPage() { onChange={(e) => setConfirmPassword(e.target.value)} placeholder="••••••••" disabled={isLoading} - className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed" + className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed bg-white dark:bg-gray-800 text-gray-900 dark:text-white" required minLength={6} /> diff --git a/apps/hackathon/src/app/auth/signup/page.tsx b/apps/hackathon/src/app/auth/signup/page.tsx index 0b4bdc2..4fcee88 100644 --- a/apps/hackathon/src/app/auth/signup/page.tsx +++ b/apps/hackathon/src/app/auth/signup/page.tsx @@ -138,8 +138,8 @@ export default function SignupPage() { }; return ( -
-
+
+
{error && ( @@ -168,7 +170,7 @@ export default function SignupPage() {
@@ -179,7 +181,7 @@ export default function SignupPage() { onChange={(e) => setFullname(e.target.value)} placeholder="John Doe" disabled={isEmailLoading} - className="w-full px-4 py-2.5 border border-gray-300 dark:border-neutral-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-neutral-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-neutral-500 disabled:bg-gray-100 dark:disabled:bg-neutral-700 disabled:cursor-not-allowed" + className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed" required />
@@ -187,7 +189,7 @@ export default function SignupPage() {
@@ -198,7 +200,7 @@ export default function SignupPage() { onChange={(e) => setEmail(e.target.value)} placeholder="your@email.com" disabled={isEmailLoading} - className="w-full px-4 py-2.5 border border-gray-300 dark:border-neutral-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-neutral-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-neutral-500 disabled:bg-gray-100 dark:disabled:bg-neutral-700 disabled:cursor-not-allowed" + className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed" required />
@@ -206,7 +208,7 @@ export default function SignupPage() {
@@ -217,7 +219,7 @@ export default function SignupPage() { onChange={(e) => setPassword(e.target.value)} placeholder="••••••••" disabled={isEmailLoading} - className="w-full px-4 py-2.5 border border-gray-300 dark:border-neutral-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-neutral-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-neutral-500 disabled:bg-gray-100 dark:disabled:bg-neutral-700 disabled:cursor-not-allowed" + className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed" required />
@@ -225,7 +227,7 @@ export default function SignupPage() {
@@ -236,7 +238,7 @@ export default function SignupPage() { onChange={(e) => setConfirmPassword(e.target.value)} placeholder="••••••••" disabled={isEmailLoading} - className="w-full px-4 py-2.5 border border-gray-300 dark:border-neutral-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-neutral-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-neutral-500 disabled:bg-gray-100 dark:disabled:bg-neutral-700 disabled:cursor-not-allowed" + className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed" required />
@@ -244,23 +246,25 @@ export default function SignupPage() {
-
- OR -
+
+ + OR + +