From 3ad1025493327835bbce7f92c4bd5a6957d48ecd Mon Sep 17 00:00:00 2001 From: semz-ui Date: Tue, 14 Oct 2025 21:20:15 +0100 Subject: [PATCH 1/6] about us page added --- apps/web/app/about-us/page.tsx | 196 +++++++++++++++++++++++++++++++++ packages/ui/src/utils/data.ts | 2 + 2 files changed, 198 insertions(+) create mode 100644 apps/web/app/about-us/page.tsx diff --git a/apps/web/app/about-us/page.tsx b/apps/web/app/about-us/page.tsx new file mode 100644 index 0000000..f09f35f --- /dev/null +++ b/apps/web/app/about-us/page.tsx @@ -0,0 +1,196 @@ +"use client" + +import Footer from "@/components/footer" +import LandingPageNavbar from "@/components/landingPage/LandingPageNavbar" +import { SparklesCore } from "@/components/ui/sparkles" +import { motion } from "motion/react" + +export default function AboutPage() { + return ( +
+
+ + +
+
+
+
+ ) +} diff --git a/packages/ui/src/utils/data.ts b/packages/ui/src/utils/data.ts index 9568687..dd1728f 100644 --- a/packages/ui/src/utils/data.ts +++ b/packages/ui/src/utils/data.ts @@ -2,6 +2,7 @@ export const navItem = [ { name: "Features", href: "#features" }, { name: "How It Works", href: "#how-it-works" }, { name: "Pricing", href: "#pricing" }, + { name: "About Us", href: "/about-us" }, ] export const footerItems = { @@ -9,6 +10,7 @@ export const footerItems = { { name: "Features", href: "./#features" }, { name: "Pricing", href: "./#pricing" }, { name: "Book a Call", href: "https://cal.com/afrin/30min" }, + { name: "About Us", href: "/about-us" }, // { name: "Docs", href: "/docs" }, ], "Account": [ From 804c0bdac6aab1b4aa22fbbbabddbe7b816d0fd0 Mon Sep 17 00:00:00 2001 From: semz-ui Date: Wed, 15 Oct 2025 19:10:19 +0100 Subject: [PATCH 2/6] contact-us page --- apps/web/app/api/contact-us/route.ts | 51 ++++++++ apps/web/app/contact-us/page.tsx | 177 +++++++++++++++++++++++++++ 2 files changed, 228 insertions(+) create mode 100644 apps/web/app/api/contact-us/route.ts create mode 100644 apps/web/app/contact-us/page.tsx diff --git a/apps/web/app/api/contact-us/route.ts b/apps/web/app/api/contact-us/route.ts new file mode 100644 index 0000000..3bbbcb9 --- /dev/null +++ b/apps/web/app/api/contact-us/route.ts @@ -0,0 +1,51 @@ +import { redirect } from "next/navigation"; +import { NextRequest, NextResponse } from "next/server"; +import { Resend } from "resend"; + + +async function contactUsMail(subject: string, email: string,body:string, resend: Resend) { + try { + const {data, error} = await resend.emails.send({ + from: 'Script AI ', + to: 'afrin@tryscriptai.com', + subject: subject, + html: `
+
+

🚨 New Issue Reported

+

From: ${email}

+

Subject: ${subject}

+
+

${body}

+
+

Sent on ${new Date().toLocaleString()}

+
+
`, + }); + if (error) { + console.error('Error sending issue mail:', error) + return { success: false, error } + } + + return { success: true, data } + } catch (error) { + console.error('Error sending mail:', error); + } +} + +export async function POST(req: NextRequest) { + const { subject, email, body } = await req.json() + + try { + const resend = new Resend(process.env.RESEND_API_KEY!); + + if (!subject || !email || !body) { + return NextResponse.json({ success: false, error: 'Missing required fields' }, { status: 400 }) + } + + const result = await contactUsMail(subject, email, body, resend) + return NextResponse.json(result, { status: result?.success ? 200 : 500 }) + + } catch (error) { + console.log(error) + } +} \ No newline at end of file diff --git a/apps/web/app/contact-us/page.tsx b/apps/web/app/contact-us/page.tsx new file mode 100644 index 0000000..c151428 --- /dev/null +++ b/apps/web/app/contact-us/page.tsx @@ -0,0 +1,177 @@ +"use client"; +import Footer from "@/components/footer"; +import { motion } from "motion/react"; +import { useState } from "react"; +import logo from "@/public/dark-logo.png" +import Image from "next/image"; +import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; + +export default function ContactPage() { + const [formData, setFormData] = useState({ name: "", email: "", message: "" }); + const [loading, setLoading] = useState(false) + + const handleChange = (e: React.ChangeEvent) => { + setFormData({ ...formData, [e.target.name]: e.target.value }); + }; + + const handleSubmit = async (e: React.FormEvent) => { + if(loading) return + e.preventDefault(); + try { + console.log(formData) + } catch (error) { + console.error(error, "error") + }finally{ + setLoading(false) + } + // TODO: integrate with backend or Supabase + }; + + return ( +
+ {/* Hero Section */} +
+
+ + Contact Us + + + Got questions, feedback, or ideas? We’d love to hear from you! + Our team is always ready to collaborate and support your AI-powered creative journey. + +
+
+ + {/* Contact Section */} +
+
+ + Logo + + + {/* Right: Contact Form */} + +

Send Us a Message

+
+
+ + +
+
+ + +
+
+ +