import React, { useState } from 'react'; // import { useNavigate } from 'react-router-dom'; import { useWallet } from '@/contexts/WalletContext'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import TokenSwap from '@/components/TokenSwap'; import PoolDashboard from '@/components/PoolDashboard'; import { CreatePoolModal } from './CreatePoolModal'; import { InitializeHezPoolModal } from './InitializeHezPoolModal'; import { ArrowRightLeft, Droplet, Settings } from 'lucide-react'; import { isFounderWallet } from '@pezkuwi/utils/auth'; export const DEXDashboard: React.FC = () => { const { account } = useWallet(); const [activeTab, setActiveTab] = useState('swap'); // Admin modal states const [showCreatePoolModal, setShowCreatePoolModal] = useState(false); const [showInitializeHezPoolModal, setShowInitializeHezPoolModal] = useState(false); const isFounder = account ? isFounderWallet(account) : false; const handleCreatePool = () => { setShowCreatePoolModal(true); }; const handleModalClose = () => { setShowCreatePoolModal(false); setShowInitializeHezPoolModal(false); }; const handleSuccess = async () => { // Pool modals will refresh their own data }; return (
Decentralized exchange for trading tokens on PezkuwiChain
{/* Wallet status */} {account && (Convert native HEZ to wrapped wHEZ for use in DEX pools
Create new liquidity pools for token pairs on PezkuwiChain
View detailed pool statistics in the Pools tab