Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ed22ec7

Browse files
committed
Modif main
1 parent 6162010 commit ed22ec7

27 files changed

Lines changed: 1765 additions & 873 deletions

File tree

actions/newsletter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use server";
22

33
import { z } from "zod";
4-
import { prisma } from "@/lib/db";
4+
import { db } from "@/lib/db";
55

66
// Validation schema for email
77
const emailSchema = z.string().email("Please enter a valid email address");
@@ -12,7 +12,7 @@ export async function subscribeToNewsletter(email: string) {
1212
const validatedEmail = emailSchema.parse(email);
1313

1414
// Check if the email already exists
15-
const existingSubscriber = await prisma.newsletterSubscriber.findUnique({
15+
const existingSubscriber = await db.newsletterSubscriber.findUnique({
1616
where: { email: validatedEmail },
1717
});
1818

@@ -21,7 +21,7 @@ export async function subscribeToNewsletter(email: string) {
2121
}
2222

2323
// Create a new subscriber
24-
await prisma.newsletterSubscriber.create({
24+
await db.newsletterSubscriber.create({
2525
data: {
2626
email: validatedEmail,
2727
},

app/(auth)/login/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import Link from "next/link";
44
import { cn } from "@/lib/utils";
55
import { buttonVariants } from "@/components/ui/button";
66
import { Icons } from "@/components/shared/icons";
7+
import { LoginForm } from "@/components/auth/login-form";
78

89
export const metadata: Metadata = {
910
title: "Login",
10-
description: "Login to your account or create an account",
11+
description: "Login to your account",
1112
};
1213

1314
export default function LoginPage() {
@@ -28,13 +29,12 @@ export default function LoginPage() {
2829
<div className="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">
2930
<div className="flex flex-col space-y-2 text-center">
3031
<Icons.logo className="mx-auto size-10" />
31-
<h1 className="text-2xl font-semibold tracking-tight">Welcome</h1>
32+
<h1 className="text-2xl font-semibold tracking-tight">Welcome back</h1>
3233
<p className="text-sm text-muted-foreground">
33-
Enter your email to sign in or create an account automatically
34+
Enter your credentials to sign in to your account
3435
</p>
3536
</div>
36-
37-
37+
<LoginForm />
3838
</div>
3939
</div>
4040
);

0 commit comments

Comments
 (0)