Add src/app/company-info/page.tsx
This commit is contained in:
217
src/app/company-info/page.tsx
Normal file
217
src/app/company-info/page.tsx
Normal file
@@ -0,0 +1,217 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import ReactLenis from "lenis/react";
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import NavbarLayoutFloatingInline from "@/components/navbar/NavbarLayoutFloatingInline";
|
||||
import { Facebook, Instagram, Linkedin, MapPin, Mail, Phone, Twitter, Wrench } from "lucide-react";
|
||||
|
||||
export default function CompanyInfoPage() {
|
||||
const [companyName, setCompanyName] = useState("AirPro HVAC");
|
||||
const [ownerName, setOwnerName] = useState("John Doe");
|
||||
const [phone, setPhone] = useState("(555) 987-6543");
|
||||
const [whatsApp, setWhatsApp] = useState("+15559876543");
|
||||
const [email, setEmail] = useState("info@airprohvac.com");
|
||||
const [address, setAddress] = useState("123 Comfort St, Austin, TX 78701");
|
||||
const [googleMaps, setGoogleMaps] = useState("https://maps.app.goo.gl/example");
|
||||
const [facebook, setFacebook] = useState("https://facebook.com/airprohvac");
|
||||
const [instagram, setInstagram] = useState("https://instagram.com/airprohvac");
|
||||
const [twitter, setTwitter] = useState("https://twitter.com/airprohvac");
|
||||
const [linkedin, setLinkedin] = useState("https://linkedin.com/company/airprohvac");
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
// In a real application, you would send this data to a backend API
|
||||
console.log("Company Info Updated:", {
|
||||
companyName,
|
||||
ownerName,
|
||||
phone,
|
||||
whatsApp,
|
||||
email,
|
||||
address,
|
||||
googleMaps,
|
||||
facebook,
|
||||
instagram,
|
||||
twitter,
|
||||
linkedin,
|
||||
});
|
||||
alert("Company information updated successfully!");
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="directional-hover"
|
||||
defaultTextAnimation="entrance-slide"
|
||||
borderRadius="soft"
|
||||
contentWidth="medium"
|
||||
sizing="medium"
|
||||
background="aurora"
|
||||
cardStyle="glass-elevated"
|
||||
primaryButtonStyle="gradient"
|
||||
secondaryButtonStyle="glass"
|
||||
headingFontWeight="semibold"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarLayoutFloatingInline
|
||||
brandName="AirPro HVAC"
|
||||
navItems={[
|
||||
{ name: "Services", id: "services" },
|
||||
{ name: "About", id: "about" },
|
||||
{ name: "Testimonials", id: "testimonials" },
|
||||
{ name: "Contact", id: "contact" },
|
||||
{ name: "Company Info", href: "/company-info" }
|
||||
]}
|
||||
button={{ text: "Get a Quote", href: "/#contact" }}
|
||||
animateOnLoad={false}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex min-h-screen flex-col items-center justify-center p-8 lg:p-16 w-full">
|
||||
<div className="w-full max-w-4xl rounded-lg bg-card p-6 shadow-xl">
|
||||
<h1 className="mb-6 text-center text-4xl font-bold text-foreground">Company Information Management</h1>
|
||||
<p className="mb-8 text-center text-lg text-foreground-lighter">Update your company's core details, contact information, and social media presence.</p>
|
||||
|
||||
<form onSubmit={handleSubmit} className="space-y-6">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label htmlFor="companyName" className="mb-2 block text-sm font-medium text-foreground-lighter">Company Name</label>
|
||||
<input
|
||||
type="text"
|
||||
id="companyName"
|
||||
value={companyName}
|
||||
onChange={(e) => setCompanyName(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor="ownerName" className="mb-2 block text-sm font-medium text-foreground-lighter">Owner Name</label>
|
||||
<input
|
||||
type="text"
|
||||
id="ownerName"
|
||||
value={ownerName}
|
||||
onChange={(e) => setOwnerName(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label htmlFor="phone" className="mb-2 block text-sm font-medium text-foreground-lighter">Phone Number</label>
|
||||
<input
|
||||
type="tel"
|
||||
id="phone"
|
||||
value={phone}
|
||||
onChange={(e) => setPhone(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor="whatsApp" className="mb-2 block text-sm font-medium text-foreground-lighter">WhatsApp Number</label>
|
||||
<input
|
||||
type="tel"
|
||||
id="whatsApp"
|
||||
value={whatsApp}
|
||||
onChange={(e) => setWhatsApp(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="email" className="mb-2 block text-sm font-medium text-foreground-lighter">Email Address</label>
|
||||
<input
|
||||
type="email"
|
||||
id="email"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="address" className="mb-2 block text-sm font-medium text-foreground-lighter">Physical Address</label>
|
||||
<input
|
||||
type="text"
|
||||
id="address"
|
||||
value={address}
|
||||
onChange={(e) => setAddress(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="googleMaps" className="mb-2 block text-sm font-medium text-foreground-lighter">Google Maps Link</label>
|
||||
<input
|
||||
type="url"
|
||||
id="googleMaps"
|
||||
value={googleMaps}
|
||||
onChange={(e) => setGoogleMaps(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label htmlFor="facebook" className="mb-2 block text-sm font-medium text-foreground-lighter">Facebook Profile</label>
|
||||
<input
|
||||
type="url"
|
||||
id="facebook"
|
||||
value={facebook}
|
||||
onChange={(e) => setFacebook(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor="instagram" className="mb-2 block text-sm font-medium text-foreground-lighter">Instagram Profile</label>
|
||||
<input
|
||||
type="url"
|
||||
id="instagram"
|
||||
value={instagram}
|
||||
onChange={(e) => setInstagram(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor="twitter" className="mb-2 block text-sm font-medium text-foreground-lighter">Twitter/X Profile</label>
|
||||
<input
|
||||
type="url"
|
||||
id="twitter"
|
||||
value={twitter}
|
||||
onChange={(e) => setTwitter(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor="linkedin" className="mb-2 block text-sm font-medium text-foreground-lighter">LinkedIn Profile</label>
|
||||
<input
|
||||
type="url"
|
||||
id="linkedin"
|
||||
value={linkedin}
|
||||
onChange={(e) => setLinkedin(e.target.value)}
|
||||
className="w-full rounded-md border border-input bg-background px-3 py-2 text-foreground shadow-sm focus:border-primary-cta focus:ring focus:ring-primary-cta focus:ring-opacity-50"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-center">
|
||||
<button
|
||||
type="submit"
|
||||
className="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 px-6 py-3 bg-primary-cta text-primary-cta-foreground hover:bg-primary-cta/90 shadow-lg"
|
||||
>
|
||||
<Wrench className="mr-2 h-5 w-5" /> Save Changes
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user