Refactor & clean up code.

This commit is contained in:
2025-07-17 15:20:59 -05:00
parent dabc248010
commit fefe7e8717
31 changed files with 473 additions and 295 deletions

View File

@@ -11,21 +11,14 @@ const AuthSuccessPage = () => {
useEffect(() => {
const handleAuthSuccess = async () => {
// Refresh the auth context to pick up the new session
await refreshUser();
// Small delay to ensure state is updated
setTimeout(() => {
router.push('/');
}, 100);
setTimeout(() => router.push('/'), 100);
};
handleAuthSuccess().catch((error) => {
console.error(`Error: ${error instanceof Error ? error.message : error}`);
});
handleAuthSuccess()
.catch(error => console.error(`Error handling auth success: ${error}`));
}, [refreshUser, router]);
// Show loading while processing
return (
<div className='flex items-center justify-center min-h-screen'>
<div className='flex flex-col items-center space-y-4'>

View File

@@ -0,0 +1,14 @@
import type { Metadata } from 'next';
export const generateMetadata = (): Metadata => {
return {
title: 'Forgot Password',
};
};
const ForgotPasswordLayout = ({
children,
}: Readonly<{ children: React.ReactNode }>) => {
return <>{children}</>;
};
export default ForgotPasswordLayout;

View File

@@ -0,0 +1,11 @@
'use client';
import { ForgotPasswordCard } from '@/components/default/auth/cards/client';
const ForgotPasswordPage = () => {
return (
<div className='flex flex-col items-center min-h-[50vh]'>
<ForgotPasswordCard cardProps={{className: 'my-auto'}}/>
</div>
);
};
export default ForgotPasswordPage;

View File

@@ -0,0 +1,14 @@
import type { Metadata } from 'next';
export const generateMetadata = (): Metadata => {
return {
title: 'Profile',
};
};
const ProfileLayout = ({
children,
}: Readonly<{ children: React.ReactNode }>) => {
return <>{children}</>;
};
export default ProfileLayout;

View File

@@ -0,0 +1,9 @@
'use client';
const ProfilePage = () => {
return (
<div className='flex flex-col items-center min-h-[90vh]'>
</div>
);
};
export default ProfilePage;