import React, { useState, useEffect } from 'react'; import { Check, Search } from 'lucide-react'; const BlockchainIdentity = () => { const [loadingId, setLoadingId] = useState(true); const [loadingMachines, setLoadingMachines] = useState(true); const [loadingBatches, setLoadingBatches] = useState(true); const [verifiedItems, setVerifiedItems] = useState>({}); useEffect(() => { // Simulate loading states const timer1 = setTimeout(() => setLoadingId(false), 1200); const timer2 = setTimeout(() => setLoadingMachines(false), 2000); const timer3 = setTimeout(() => setLoadingBatches(false), 3000); return () => { clearTimeout(timer1); clearTimeout(timer2); clearTimeout(timer3); }; }, []); const machines = [ { id: '0x72F8...9A3B', name: 'CNC Mill #103', lastMaintenance: '2023-04-15', status: 'Active' }, { id: '0x91A3...F721', name: 'Robotic Arm #47', lastMaintenance: '2023-05-02', status: 'Maintenance' }, { id: '0x45D1...8E32', name: 'Assembly Line #2', lastMaintenance: '2023-04-28', status: 'Active' }, ]; const batches = [ { id: '0xBF72...1D43', product: 'Engine Block', quantity: 250, date: '2023-05-01', status: 'Completed' }, { id: '0x31E8...7A92', product: 'Transmission', quantity: 150, date: '2023-05-03', status: 'In Progress' }, ]; const verifyItem = (id: string) => { setVerifiedItems(prev => ({ ...prev, [id]: true })); }; return (

Blockchain Identity & Traceability

Connected to Ethereum
{/* Identity Verification Section */}

System Identity

{loadingId ? (
) : (
Digital Factory Genesis
ID: 0x8F42...7B21 Verified
)}
{/* Machines Section */}

Machine NFTs

{loadingMachines ? (
{[1, 2, 3].map((_, idx) => (
))}
) : (
{machines.map((machine) => (
{machine.name}
ID: {machine.id}
{machine.status} {verifiedItems[machine.id] ? ( Verified ) : ( )}
))}
)}
{/* Production Batches Section */}

Production Batch NFTs

{loadingBatches ? (
{[1, 2].map((_, idx) => (
))}
) : (
{batches.map((batch) => (
{batch.product}
ID: {batch.id} • Qty: {batch.quantity}
{batch.status} {verifiedItems[batch.id] ? ( Verified ) : ( )}
))}
)}
); }; export default BlockchainIdentity;