Refactor code structure for improved readability and maintainability
This commit is contained in:
+50
-45
@@ -12,45 +12,20 @@ export default async function RegisterPage({
|
|||||||
}: {
|
}: {
|
||||||
searchParams: Promise<{ [key: string]: string | string[] | undefined }>
|
searchParams: Promise<{ [key: string]: string | string[] | undefined }>
|
||||||
}) {
|
}) {
|
||||||
const resolvedParams = await searchParams;
|
const resolvedParams = await searchParams
|
||||||
const error = resolvedParams?.error;
|
const error = resolvedParams?.error
|
||||||
const message = resolvedParams?.message;
|
const message = resolvedParams?.message
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex min-h-screen bg-background">
|
<div className="flex min-h-screen bg-background">
|
||||||
{error && message && <ErrorToaster message={String(message)} />}
|
{error && message && <ErrorToaster message={String(message)} />}
|
||||||
|
|
||||||
{/* Sol Taraf - Resim Alanı */}
|
|
||||||
<div className="hidden lg:flex lg:w-1/2 p-4 relative">
|
|
||||||
<div className="relative w-full h-full overflow-hidden rounded-2xl bg-black">
|
|
||||||
<Image
|
|
||||||
src="/images/1830857_Image.png"
|
|
||||||
alt="MindSpace Background"
|
|
||||||
fill
|
|
||||||
className="object-cover opacity-60"
|
|
||||||
priority
|
|
||||||
/>
|
|
||||||
<div className="absolute inset-0 bg-gradient-to-t from-background via-transparent to-background/30 opacity-90" />
|
|
||||||
{/* Logo */}
|
|
||||||
<div className="absolute inset-0 flex items-center justify-center pointer-events-none z-10">
|
|
||||||
<div className="relative w-64 h-64 drop-shadow-2xl">
|
|
||||||
<Image
|
|
||||||
src="/logo/logo.png"
|
|
||||||
alt="MindSpace Logo"
|
|
||||||
fill
|
|
||||||
className="object-contain"
|
|
||||||
priority
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Sağ Taraf - Form Alanı */}
|
|
||||||
<div className="flex flex-1 items-center justify-center p-8 w-full lg:w-1/2">
|
<div className="flex flex-1 items-center justify-center p-8 w-full lg:w-1/2">
|
||||||
<div className="w-full max-w-sm space-y-8">
|
<div className="w-full max-w-sm space-y-8">
|
||||||
<div className="text-center lg:text-left">
|
<div className="text-center lg:text-left">
|
||||||
<h1 className="text-3xl font-bold tracking-tight text-foreground">Aramıza Katılın</h1>
|
<h1 className="text-3xl font-bold tracking-tight text-foreground">
|
||||||
|
Aramıza Katılın
|
||||||
|
</h1>
|
||||||
<p className="text-sm text-muted-foreground mt-2">
|
<p className="text-sm text-muted-foreground mt-2">
|
||||||
Kişisel yaşam alanınızı oluşturmak için kayıt olun
|
Kişisel yaşam alanınızı oluşturmak için kayıt olun
|
||||||
</p>
|
</p>
|
||||||
@@ -60,28 +35,31 @@ export default async function RegisterPage({
|
|||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="email">E-posta</Label>
|
<Label htmlFor="email">E-posta</Label>
|
||||||
<Input
|
<Input
|
||||||
id="email"
|
id="email"
|
||||||
name="email"
|
name="email"
|
||||||
type="email"
|
type="email"
|
||||||
placeholder="ornek@mail.com"
|
placeholder="ornek@mail.com"
|
||||||
required
|
required
|
||||||
className="h-11 bg-input-bg border-border"
|
className="h-11 bg-input-bg border-border"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="password">Şifre</Label>
|
<Label htmlFor="password">Şifre</Label>
|
||||||
<Input
|
<Input
|
||||||
id="password"
|
id="password"
|
||||||
name="password"
|
name="password"
|
||||||
type="password"
|
type="password"
|
||||||
required
|
required
|
||||||
className="h-11 bg-input-bg border-border"
|
className="h-11 bg-input-bg border-border"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Button formAction={signup} className="w-full h-11 text-base font-medium shadow-md transition-transform active:scale-[0.98] bg-primary hover:bg-primary-hover text-primary-foreground">
|
<Button
|
||||||
|
formAction={signup}
|
||||||
|
className="w-full h-11 text-base font-medium shadow-md transition-transform active:scale-[0.98] bg-primary hover:bg-primary-hover text-primary-foreground"
|
||||||
|
>
|
||||||
Kayıt Ol
|
Kayıt Ol
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
@@ -97,19 +75,46 @@ export default async function RegisterPage({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Button type="button" variant="outline" className="w-full h-11 text-base font-medium bg-card border-border hover:bg-secondary transition-colors">
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="outline"
|
||||||
|
className="w-full h-11 text-base font-medium bg-card border-border hover:bg-secondary transition-colors"
|
||||||
|
>
|
||||||
<Icon icon="flat-color-icons:google" className="w-5 h-5 mr-2" />
|
<Icon icon="flat-color-icons:google" className="w-5 h-5 mr-2" />
|
||||||
Google ile Devam Et
|
Google ile Devam Et
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<div className="text-center text-sm mt-6">
|
<div className="text-center text-sm mt-6">
|
||||||
Zaten hesabınız var mı?{' '}
|
Zaten hesabınız var mı?{' '}
|
||||||
<Link href="/login" className="font-medium text-primary hover:text-primary-hover transition-colors">
|
<Link
|
||||||
|
href="/login"
|
||||||
|
className="font-medium text-primary hover:text-primary-hover transition-colors"
|
||||||
|
>
|
||||||
Giriş Yap
|
Giriş Yap
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="hidden lg:flex lg:w-1/2 p-4 relative">
|
||||||
|
<div className="relative w-full h-full overflow-hidden rounded-2xl">
|
||||||
|
<img
|
||||||
|
src="/images/1830837_Image.png"
|
||||||
|
alt="MindSpace Background"
|
||||||
|
className="w-full h-full object-cover"
|
||||||
|
/>
|
||||||
|
<div className="absolute inset-0 bg-gradient-to-t from-background via-transparent to-background/30 opacity-90" />
|
||||||
|
<div className="absolute bottom-0 flex items-center justify-center pointer-events-none z-10">
|
||||||
|
<div className="relative drop-shadow-2xl flex items-center gap-4">
|
||||||
|
<img
|
||||||
|
src="/logo/logo.png"
|
||||||
|
alt="MindSpace Logo"
|
||||||
|
className="object-contain w-64 h-auto"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user