From 71094f6c868660cb304da368802895aeec36857b Mon Sep 17 00:00:00 2001 From: AmirReza Jamali Date: Sat, 25 Oct 2025 16:11:23 +0330 Subject: [PATCH] feat: Refactor contact form and improve 404 page This commit refactors the contact form for better reusability and moves it from the global footer to a dedicated section on the homepage. Additionally, it enhances the user experience on the 404 page. Key changes: - The `ContactUsForm` component is now configurable with props for grid layout (`columnsPerRow`) and button text, making it more versatile. - The contact form has been removed from the shared footer in the main layout and is now explicitly included only on the homepage. - The 404 "Not Found" page has been updated to include a direct link to the homepage for easier navigation. - Minor style adjustments were made to the 404 page layout and input field padding for improved visual consistency. --- app/(home)/contact-us/page.tsx | 49 +++++ app/(home)/layout.tsx | 172 +++++++++++++++++ app/(home)/page.tsx | 100 ++++++++++ app/(not-found)/[...not-found]/layout.tsx | 11 +- app/(not-found)/[...not-found]/page.tsx | 13 +- app/_components/FooterForm.tsx | 4 - app/_components/InputGroup.tsx | 2 +- app/_components/NavigationBar.tsx | 36 ++++ app/_contact-us/form.tsx | 34 +++- app/{(main) => marketing/[id]}/page.tsx | 5 +- app/{(main) => marketing}/layout.tsx | 0 app/marketing/page.tsx | 215 ++++++++++++++++++++++ constants/endpoints.ts | 0 dump.rdb | Bin 88 -> 0 bytes 14 files changed, 620 insertions(+), 21 deletions(-) create mode 100644 app/(home)/contact-us/page.tsx create mode 100644 app/(home)/layout.tsx create mode 100644 app/(home)/page.tsx create mode 100644 app/_components/NavigationBar.tsx rename app/{(main) => marketing/[id]}/page.tsx (98%) rename app/{(main) => marketing}/layout.tsx (100%) create mode 100644 app/marketing/page.tsx delete mode 100644 constants/endpoints.ts delete mode 100644 dump.rdb diff --git a/app/(home)/contact-us/page.tsx b/app/(home)/contact-us/page.tsx new file mode 100644 index 0000000..f629401 --- /dev/null +++ b/app/(home)/contact-us/page.tsx @@ -0,0 +1,49 @@ +import ContactUsForm from "@/app/_contact-us/form"; +import { Metadata } from "next"; + +export const metadata: Metadata = { + title: "Opp lens - Contact Us", + description: + "Automated tender management platform for SMEs. Find tailored tenders, automate document handling, and get real-time alerts. Win more opportunities with less effort.", + keywords: + "tender management, AI tender search, SME tenders, public procurement, automated bidding, tender alerts", + authors: [{ name: "PBL Partners AB" }], + openGraph: { + title: "Opp lens - AI-Powered Tender Management", + description: "Win more tenders automatically with our AI-powered platform", + type: "website", + locale: "en_US", + siteName: "Opp lens", + }, + icons: { + icon: "/fav-icon.svg", + }, +}; + +const ContactUsPage = () => { + return ( + <> +
+

+ Contact Us +

+

Let's Get In Touch

+

+ Or just reach out manually to + + info@opplens.com + +

+
+
+
+ +
+
+ + ); +}; + +export default ContactUsPage; diff --git a/app/(home)/layout.tsx b/app/(home)/layout.tsx new file mode 100644 index 0000000..d972452 --- /dev/null +++ b/app/(home)/layout.tsx @@ -0,0 +1,172 @@ +import type { Metadata } from "next"; +import { Geist, Geist_Mono } from "next/font/google"; +import Image from "next/image"; +import Link from "next/link"; +import { ToastContainer, Zoom } from "react-toastify"; +import NavigationBar from "../_components/NavigationBar"; +import "../globals.css"; +const geistSans = Geist({ + variable: "--font-geist-sans", + subsets: ["latin"], +}); + +const geistMono = Geist_Mono({ + variable: "--font-geist-mono", + subsets: ["latin"], +}); + +export const metadata: Metadata = { + title: "Create Next App", + description: "Generated by create next app", + icons: { + icon: "/fav-icon.svg", + }, +}; + +function ContactInfo({ + icon, + contact, + href, + ariaLabel, + contactIconSrc, +}: { + icon: string; + contact: string; + href?: string; + ariaLabel: string; + contactIconSrc?: string; +}) { + return ( +
+ + {href ? ( + + {contact} + + ) : ( +

+ {!!contactIconSrc && ( + flag + )} + {contact} +

+ )} +
+ ); +} + +export default async function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + const contactInfo = [ + { + icon: "/Message.svg", + contact: "info@opplens.com", + href: "mailto:info@opplens.com", + ariaLabel: "Email us at info@opplens.com", + }, + { + icon: "/Phone.svg", + contact: "(+46) - 761581526", + href: "tel:+46761581526", + ariaLabel: "Call us at +46 761581526", + }, + { + icon: "/Location.svg", + contact: "Stockholm, Sweden", + ariaLabel: "Our location in Stockholm, Sweden", + contactIconSrc: "/sweden.svg", + }, + ]; + + return ( + + +
+
+ + Opp lens logo + +
+ + +
+ + + +
{children}
+
+
+
+
+ Opp lens logo +
+

+ Democratizing Tender Access for SMEs. +

+

+ © 2025 Opplens.com by PBL Partners AB. All Rights Reserved. +

+
+
+
+ {contactInfo.map((contact, index) => ( + + ))} +
+
+
+
+ + + ); +} diff --git a/app/(home)/page.tsx b/app/(home)/page.tsx new file mode 100644 index 0000000..3e29252 --- /dev/null +++ b/app/(home)/page.tsx @@ -0,0 +1,100 @@ +import { Metadata } from "next"; +import Image from "next/image"; + +export const metadata: Metadata = { + title: "Opp lens - AI-Powered Tender Management for SMEs | Win More Tenders", + description: + "Automated tender management platform for SMEs. Find tailored tenders, automate document handling, and get real-time alerts. Win more opportunities with less effort.", + keywords: + "tender management, AI tender search, SME tenders, public procurement, automated bidding, tender alerts", + authors: [{ name: "PBL Partners AB" }], + openGraph: { + title: "Opp lens - AI-Powered Tender Management", + description: "Win more tenders automatically with our AI-powered platform", + type: "website", + locale: "en_US", + siteName: "Opp lens", + }, + icons: { + icon: "/fav-icon.svg", + }, +}; + +export default function Home() { + const advItems = [ + { + title: "user", + amount: 200, + description: + "lacking the time, dedicated staff, and expertise to constantly monitor the market and prepare high-quality bids.", + }, + { + title: "contract", + amount: 520, + description: + "Navigating complex requirements and processes designed for large corporations with dedicated tender departments.", + }, + { + title: "tenders", + amount: 1500, + description: + "Did you know 68% of SMEs in Sweden rarely or never win public tenders? It's time to change that.", + }, + ]; + return ( + <> +
+
+

AI-Powered

+

+ Tender +
+ Management +

+
+

+ Win more tenders, automatically! +

+

+ Our platform finds tenders tailored to your business, automates + document handling, and sends real-time alerts. Win more + opportunities with less effort and zero manual search. +

+
+
+
+ dynamic island + phone +
+
+
+
+ {advItems.map((item) => ( +
+

{item.amount}

+

+ {item.title} +

+

{item.description}

+
+ ))} +
+
+ + ); +} diff --git a/app/(not-found)/[...not-found]/layout.tsx b/app/(not-found)/[...not-found]/layout.tsx index 6be2e1c..a252b7d 100644 --- a/app/(not-found)/[...not-found]/layout.tsx +++ b/app/(not-found)/[...not-found]/layout.tsx @@ -127,14 +127,9 @@ export default async function RootLayout({ />
{children}
-