import React, { useState, useEffect } from 'react'; import './MobileApp.css'; // Mock data for demonstration purposes const mockVehicles = [ { id: 1, name: 'Tesla Model 3', type: 'sedan', range: '310 miles', available: true, image: '/images/tesla_model3.png' }, { id: 2, name: 'Tesla Model Y', type: 'suv', range: '330 miles', available: true, image: '/images/tesla_modely.png' }, { id: 3, name: 'Tesla Cybertruck', type: 'truck', range: '500 miles', available: false, image: '/images/cybertruck.png' }, { id: 4, name: 'GMC Hummer EV', type: 'truck', range: '350 miles', available: true, image: '/images/hummer_ev.png' }, ]; const mockSubscriptions = [ { id: 1, name: 'FlexRide', price: 500, description: 'Basic access to Unity Fleet vehicles', features: ['24/7 vehicle access', 'Basic charging', 'Standard support'] }, { id: 2, name: 'Take-Home', price: 1200, description: 'Dedicated vehicle for personal use', features: ['Dedicated vehicle', 'Home charging setup', 'Premium support', 'Insurance included'] }, { id: 3, name: 'All-Access', price: 2000, description: 'Complete mobility solution', features: ['Multiple vehicle types', 'Priority charging', 'Concierge service', 'VIP lounge access', 'Unlimited miles'] }, ]; const mockChargingLocations = [ { id: 1, name: 'The Link - Downtown', address: '123 Main St, Springfield, IL', available: 5, total: 8, amenities: ['Lounge', 'Coffee Bar', 'WiFi'] }, { id: 2, name: 'The Link - Westside', address: '456 Oak Ave, Springfield, IL', available: 2, total: 6, amenities: ['Lounge', 'Retail', 'WiFi'] }, { id: 3, name: 'The Link - University', address: '789 Campus Dr, Urbana, IL', available: 8, total: 12, amenities: ['Lounge', 'Restaurant', 'WiFi', 'Conference Room'] }, ]; function MobileApp() { const [activeTab, setActiveTab] = useState('home'); const [loading, setLoading] = useState(true); const [user, setUser] = useState({ name: 'Matthew Lamb', subscription: 'All-Access', credits: 2500, reservations: [ { id: 101, vehicle: 'Tesla Model 3', date: '2025-04-08', time: '09:00 AM', location: 'The Link - Downtown' } ] }); useEffect(() => { // Simulate loading const timer = setTimeout(() => { setLoading(false); }, 1500); return () => clearTimeout(timer); }, []); if (loading) { return (
Unity Fleet

Connecting to The Link...

); } return (

THE LINK

Profile
{activeTab === 'home' && (

Welcome back, {user.name}

{user.subscription} Member

${user.credits} Available Credits

Upcoming Reservations

{user.reservations.length > 0 ? ( user.reservations.map(reservation => (
{reservation.vehicle}
{reservation.date} at {reservation.time}
{reservation.location}
)) ) : (

No upcoming reservations

)}

Nearby Charging Hubs

{mockChargingLocations.map(hub => (

{hub.name}

{hub.address}

0 ? "available" : "unavailable"}> {hub.available}/{hub.total} Available
))}
)} {activeTab === 'vehicles' && (

Available Vehicles

{mockVehicles.map(vehicle => (
{vehicle.name} {!vehicle.available &&
Reserved
}

{vehicle.name}

{vehicle.type}

Range: {vehicle.range}

))}
)} {activeTab === 'subscriptions' && (

Subscription Plans

Current Plan: {user.subscription}

{mockSubscriptions.map(sub => (

{sub.name}

${sub.price}/mo

{sub.description}

    {sub.features.map((feature, index) => (
  • {feature}
  • ))}
))}
)} {activeTab === 'charging' && (

Charging Lounges

Charging Map
{mockChargingLocations.map(location => (
{location.name}
))}

Charging Locations

{mockChargingLocations.map(location => (

{location.name}

{location.address}

{location.amenities.map((amenity, index) => ( {amenity} ))}
0 ? 'available' : 'full'}`}> {location.available > 0 ? `${location.available} Available` : 'Full'}
))}
)} {activeTab === 'chainlink' && (

ChainLink Tokenization

125.5
LINK Tokens
Estimated Value
$12,550
+5.2% this week

Your Token Portfolio

Charging Infrastructure
75.0 LINK
🚗
Fleet Vehicles
32.5 LINK
🔋
Energy Systems
18.0 LINK

Recent Transactions

+
Purchased 10.0 LINK
Apr 5, 2025
$1,000
Loyalty Reward
Apr 1, 2025
+2.5 LINK
$
Quarterly Dividend
Mar 31, 2025
$325
)}
); } export default MobileApp;