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
bottom of page