Logo Lanfrica

ligAfric/ligafric--website-

Domain:

agriculture

Record type:

software
Creator:
lig
Host:
Agricultural marketplace platform empowering African farmers import React, { useState } from 'react'; import { Home, ShoppingBag, Truck, UserCheck, CloudSun, Store, User, PlusCircle, Search, Menu, X, ArrowRight, MapPin, Phone } from 'lucide-react'; export default function LigAfricApp() { const [activeTab, setActiveTab] = useState('dashboard'); const [isMenuOpen, setIsMenuOpen] = useState(false); // Mock Data const [products, setProducts] = useState([ { id: 1, name: 'Fresh Yellow Maize', price: '$25 / Bag', location: 'Nakuru, Kenya', category: 'Crops', seller: 'John Doe' }, { id: 2, name: 'Organic Tomatoes', price: '$12 / Crate', location: 'Ibadan, Nigeria', category: 'Vegetables', seller: 'Amina Bello' }, { id: 3, name: 'Grade A Cassava', price: '$18 / Bag', location: 'Kumasi, Ghana', category: 'Tubers', seller: 'Kofi Mensah' } ]); const [newProduct, setNewProduct] = useState({ name: '', price: '', location: '', category: 'Crops' }); const handleAddProduct = (e) => { e.preventDefault(); if (!newProduct.name || !newProduct.price) return; setProducts([...products, { ...newProduct, id: Date.now(), seller: 'You (Farmer Profile)' }]); setNewProduct({ name: '', price: '', location: '', category: 'Crops' }); setActiveTab('marketplace'); }; return ( {/* SIDEBAR NAVIGATION */} lig Afric setIsMenuOpen(false)} className="md:hidden text-emerald-200 hover:text-white"> } label="Dashboard" active={activeTab === 'dashboard'} onClick={() => { setActiveTab('dashboard'); setIsMenuOpen(false); }} /> } label="Marketplace" active={activeTab === 'marketplace' || activeTab === 'add-product'} onClick={() => { setActiveTab('marketplace'); setIsMenuOpen(false); }} /> } label="Delivery & Logistics" active={activeTab === 'logistics'} onClick={() => { setActiveTab('logistics'); setIsMenuOpen(false); }} /> } label="Agri Experts" active={activeTab === 'experts'} onClick={() => { setActiveTab('experts'); setIsMenuOpen(false); }} /> } label="Weather Updates" active={activeTab === 'weather'} onClick={() => { setActiveTab('weather'); setIsMenuOpe …

Languages