import { useState } from "react"; import { motion } from "framer-motion"; export default function CustomerLogin() { const [username, setUsername] = useState(""); const [password, setPassword] = useState(""); const [loggedIn, setLoggedIn] = useState(false); const [customerData, setCustomerData] = useState(null); const handleLogin = () => { // Mock authentication and data retrieval setCustomerData({ name: "John Doe", accountNumber: "123456789", devices: [ { name: "Smart TV", location: "Living Room", usage: "3 hrs/day", wifiSpeed: "100 Mbps" }, { name: "Thermostat", location: "Bedroom", usage: "Auto", wifiSpeed: "N/A" }, ], smartHome: true, energySaver: true, services: ["Internet", "TV", "Smart Home Integration"], }); setLoggedIn(true); }; return (
{!loggedIn ? (

Customer Login

setUsername(e.target.value)} className="wp-block-input mb-2" /> setPassword(e.target.value)} className="wp-block-input mb-4" />
) : (

Welcome, {customerData.name}

Account Number: {customerData.accountNumber}

Devices

Features

Smart Home: {customerData.smartHome ? "Enabled" : "Disabled"}

Energy Saver: {customerData.energySaver ? "Enabled" : "Disabled"}

Services on Account

)}
); }
top of page
I'm a product description. I'm a great place to add more details about your product such as sizing, material, care instructions and cleaning instructions.

I'm a product

SKU: 364215376135199
$85.00Price
Quantity
  • I'm a product detail. I'm a great place to add more information about your product such as sizing, material, care and cleaning instructions. This is also a great space to write what makes this product special and how your customers can benefit from this item.
bottom of page