Update src/app/application-form/page.tsx
This commit is contained in:
@@ -1,87 +1,16 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered';
|
||||
import FooterSimple from '@/components/sections/footer/FooterSimple';
|
||||
import Link from 'next/link';
|
||||
import ButtonTextShift from '@/components/button/ButtonTextShift/ButtonTextShift';
|
||||
import { FileText, DollarSign } from "lucide-react";
|
||||
|
||||
export default function ApplicationFormPage() {
|
||||
const router = useRouter();
|
||||
const [formData, setFormData] = useState({
|
||||
name: '',
|
||||
email: '',
|
||||
phone: '',
|
||||
occupation: '',
|
||||
company: '',
|
||||
propertyId: '',
|
||||
document: null as File | null,
|
||||
});
|
||||
|
||||
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
||||
const { name, value } = e.target;
|
||||
setFormData(prev => ({ ...prev, [name]: value }));
|
||||
};
|
||||
|
||||
const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (e.target.files && e.target.files[0]) {
|
||||
setFormData(prev => ({ ...prev, document: e.target.files![0] }));
|
||||
}
|
||||
};
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
const handleFormSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
// In a real application, you would send formData to your backend here
|
||||
console.log('Application Form Data Submitted:', formData);
|
||||
router.push('/payment'); // Navigate to the payment page
|
||||
};
|
||||
|
||||
const footerColumns = [
|
||||
{
|
||||
title: "Company", items: [
|
||||
{ label: "About Us", href: "/#about" },
|
||||
{ label: "Our Services", href: "/#services" },
|
||||
{ label: "Executive Team", href: "/#team" },
|
||||
{ label: "Properties", href: "/#properties" },
|
||||
{ label: "Contact", href: "/#contact" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Resources", items: [
|
||||
{ label: "Investment Guide", href: "#" },
|
||||
{ label: "Market Reports", href: "#" },
|
||||
{ label: "FAQ", href: "#" },
|
||||
{ label: "Blog", href: "#" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Legal", items: [
|
||||
{ label: "Privacy Policy", href: "#" },
|
||||
{ label: "Terms of Service", href: "#" },
|
||||
{ label: "Cookie Policy", href: "#" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Connect", items: [
|
||||
{ label: "LinkedIn", href: "#" },
|
||||
{ label: "Instagram", href: "#" },
|
||||
{ label: "WhatsApp", href: "#" }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
const navbarProps = {
|
||||
brandName: "Luxe Properties", navItems: [
|
||||
{ name: "Properties", id: "properties" },
|
||||
{ name: "About", id: "about" },
|
||||
{ name: "Services", id: "services" },
|
||||
{ name: "Team", id: "team" },
|
||||
{ name: "Testimonials", id: "testimonials" },
|
||||
{ name: "Application", id: "/application-form" },
|
||||
{ name: "Contact", id: "contact" }
|
||||
],
|
||||
button: { text: "Schedule Viewing", href: "#contact" }
|
||||
// In a real application, you would handle form submission here, e.g., send data to an API
|
||||
alert("Application submitted! Please proceed to payment.");
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -98,123 +27,145 @@ export default function ApplicationFormPage() {
|
||||
headingFontWeight="medium"
|
||||
>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarStyleCentered {...navbarProps} />
|
||||
<NavbarStyleCentered
|
||||
brandName="Luxe Properties"
|
||||
navItems={[
|
||||
{ name: "Properties", id: "properties" },
|
||||
{ name: "About", id: "about" },
|
||||
{ name: "Services", id: "services" },
|
||||
{ name: "Team", id: "team" },
|
||||
{ name: "Testimonials", id: "testimonials" },
|
||||
{ name: "Contact", id: "contact" },
|
||||
{ name: "Apply Now", id: "/application-form" }
|
||||
]}
|
||||
button={{ text: "Schedule Viewing", href: "contact" }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<main className="relative z-10 py-20 min-h-[calc(100vh-200px)]">
|
||||
<div className="container mx-auto px-4 max-w-2xl">
|
||||
<h1 className="text-4xl md:text-5xl font-bold text-center mb-8">Application Form</h1>
|
||||
<p className="text-center text-lg mb-8 text-gray-600 dark:text-gray-300">
|
||||
Please fill out the form below to apply for your desired property. A non-refundable application fee of $60 is required to process your application.
|
||||
You will be redirected to a secure payment page after submission.
|
||||
<main className="min-h-screen pt-24 pb-12 flex flex-col items-center justify-center text-foreground">
|
||||
<div className="container max-w-3xl mx-auto p-6 bg-card rounded-lg shadow-lg">
|
||||
<h1 className="text-4xl md:text-5xl font-bold mb-6 text-center">Application Form</h1>
|
||||
<p className="text-center text-lg text-foreground-lighter mb-8">
|
||||
Complete the form below to apply for your dream property.
|
||||
</p>
|
||||
|
||||
<form onSubmit={handleSubmit} className="bg-white dark:bg-gray-800 shadow-lg rounded-xl p-8 space-y-6">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label htmlFor="name" className="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1">Full Name</label>
|
||||
<input
|
||||
type="text"
|
||||
id="name"
|
||||
name="name"
|
||||
value={formData.name}
|
||||
onChange={handleInputChange}
|
||||
required
|
||||
className="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-primary-cta focus:border-primary-cta"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor="email" className="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1">Email Address</label>
|
||||
<input
|
||||
type="email"
|
||||
id="email"
|
||||
name="email"
|
||||
value={formData.email}
|
||||
onChange={handleInputChange}
|
||||
required
|
||||
className="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-primary-cta focus:border-primary-cta"
|
||||
/>
|
||||
</div>
|
||||
<form onSubmit={handleFormSubmit} className="space-y-6">
|
||||
<div>
|
||||
<label htmlFor="name" className="block text-sm font-medium text-foreground">Name</label>
|
||||
<input
|
||||
type="text"
|
||||
id="name"
|
||||
name="name"
|
||||
required
|
||||
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-cta focus:ring-primary-cta bg-background p-2 text-foreground"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="phone" className="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1">Phone Number</label>
|
||||
<label htmlFor="email" className="block text-sm font-medium text-foreground">Email</label>
|
||||
<input
|
||||
type="email"
|
||||
id="email"
|
||||
name="email"
|
||||
required
|
||||
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-cta focus:ring-primary-cta bg-background p-2 text-foreground"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="phone" className="block text-sm font-medium text-foreground">Phone</label>
|
||||
<input
|
||||
type="tel"
|
||||
id="phone"
|
||||
name="phone"
|
||||
value={formData.phone}
|
||||
onChange={handleInputChange}
|
||||
required
|
||||
className="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-primary-cta focus:border-primary-cta"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label htmlFor="occupation" className="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1">Occupation</label>
|
||||
<input
|
||||
type="text"
|
||||
id="occupation"
|
||||
name="occupation"
|
||||
value={formData.occupation}
|
||||
onChange={handleInputChange}
|
||||
required
|
||||
className="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-primary-cta focus:border-primary-cta"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor="company" className="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1">Company (Optional)</label>
|
||||
<input
|
||||
type="text"
|
||||
id="company"
|
||||
name="company"
|
||||
value={formData.company}
|
||||
onChange={handleInputChange}
|
||||
className="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-primary-cta focus:border-primary-cta"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="propertyId" className="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1">Property Identifier (e.g., Listing ID)</label>
|
||||
<input
|
||||
type="text"
|
||||
id="propertyId"
|
||||
name="propertyId"
|
||||
value={formData.propertyId}
|
||||
onChange={handleInputChange}
|
||||
required
|
||||
className="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-primary-cta focus:border-primary-cta"
|
||||
placeholder="e.g., PJ-V-123"
|
||||
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-cta focus:ring-primary-cta bg-background p-2 text-foreground"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="document" className="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1">Upload Supporting Document (e.g., ID, Resume)</label>
|
||||
<label htmlFor="employmentInfo" className="block text-sm font-medium text-foreground">Employment Information</label>
|
||||
<textarea
|
||||
id="employmentInfo"
|
||||
name="employmentInfo"
|
||||
rows={4}
|
||||
required
|
||||
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-cta focus:ring-primary-cta bg-background p-2 text-foreground"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="documentUpload" className="block text-sm font-medium text-foreground">Document Upload (e.g., ID, proof of funds)</label>
|
||||
<input
|
||||
type="file"
|
||||
id="document"
|
||||
name="document"
|
||||
onChange={handleFileChange}
|
||||
className="w-full p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-100 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-primary-cta-light file:text-primary-cta-foreground hover:file:bg-primary-cta-dark dark:file:bg-primary-cta-dark dark:file:text-white dark:hover:file:bg-primary-cta"
|
||||
id="documentUpload"
|
||||
name="documentUpload"
|
||||
multiple
|
||||
className="mt-1 block w-full text-foreground file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-primary-cta file:text-primary-cta-foreground hover:file:bg-primary-cta-hover cursor-pointer"
|
||||
/>
|
||||
<p className="mt-2 text-xs text-gray-500 dark:text-gray-400">Max file size: 5MB (PDF, JPG, PNG)</p>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
className="w-full bg-primary-cta text-primary-cta-foreground py-3 px-6 rounded-lg text-lg font-semibold hover:bg-primary-cta-dark transition-colors"
|
||||
>
|
||||
Proceed to Payment ($60 Application Fee)
|
||||
</button>
|
||||
<p className="text-center text-sm text-green-600 font-semibold mt-8">
|
||||
Your application has been received! Please proceed to the payment section to finalize your submission.
|
||||
</p>
|
||||
|
||||
<div className="border-t border-gray-200 pt-8 mt-8">
|
||||
<h2 className="text-3xl font-bold mb-4 text-center">Application Fee</h2>
|
||||
<p className="text-center text-foreground-lighter mb-4">
|
||||
A non-refundable application fee of <span className="font-semibold text-primary-cta">$60 USD</span> is required to process your application. This fee covers administrative costs and a preliminary review of your submission.
|
||||
</p>
|
||||
<p className="text-center text-foreground-lighter mb-6">
|
||||
Click the button below to complete your payment securely via Flutterwave.
|
||||
</p>
|
||||
<div className="flex justify-center">
|
||||
<ButtonTextShift
|
||||
text="Pay $60 Application Fee"
|
||||
href="https://flutterwave.com/pay/4jnjkgftkyoz"
|
||||
type="button"
|
||||
className="bg-primary-cta text-primary-cta-foreground px-6 py-3 rounded-full text-lg font-semibold hover:bg-primary-cta-hover transition-colors"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterSimple
|
||||
columns={footerColumns}
|
||||
columns={[
|
||||
{
|
||||
title: "Company", items: [
|
||||
{ label: "About Us", href: "#about" },
|
||||
{ label: "Our Services", href: "#services" },
|
||||
{ label: "Executive Team", href: "#team" },
|
||||
{ label: "Properties", href: "#properties" },
|
||||
{ label: "Contact", href: "#contact" },
|
||||
{ label: "Apply Now", href: "/application-form" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Resources", items: [
|
||||
{ label: "Investment Guide", href: "#" },
|
||||
{ label: "Market Reports", href: "#" },
|
||||
{ label: "FAQ", href: "#" },
|
||||
{ label: "Blog", href: "#" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Legal", items: [
|
||||
{ label: "Privacy Policy", href: "#" },
|
||||
{ label: "Terms of Service", href: "#" },
|
||||
{ label: "Cookie Policy", href: "#" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Connect", items: [
|
||||
{ label: "LinkedIn", href: "#" },
|
||||
{ label: "Instagram", href: "#" },
|
||||
{ label: "WhatsApp", href: "#" }
|
||||
]
|
||||
}
|
||||
]}
|
||||
bottomLeftText="© 2025 Luxe Properties Dubai. All rights reserved."
|
||||
bottomRightText="Luxury Real Estate Excellence"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user