Remove redundant swap and pool pages (Phase 1.2)

- Removed /pool route from App.tsx (redundant with DEX Pools tab)
- Deleted pages/PoolDashboard.tsx (functionality in DEXDashboard)
- Removed TokenSwap modal from AppLayout (redundant with DEX Swap tab)
- Updated WalletDashboard Pool button to navigate to home page

Benefits:
- Reduces code duplication
- Provides consistent user experience through single DEX interface
- Simplifies maintenance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-12 03:11:55 +03:00
parent 5eeff778dd
commit 5496de1488
4 changed files with 2 additions and 57 deletions
-6
View File
@@ -8,7 +8,6 @@ import PasswordReset from '@/pages/PasswordReset';
import ProfileSettings from '@/pages/ProfileSettings';
import AdminPanel from '@/pages/AdminPanel';
import WalletDashboard from './pages/WalletDashboard';
import PoolDashboardPage from './pages/PoolDashboard';
import ReservesDashboardPage from './pages/ReservesDashboardPage';
import BeCitizen from './pages/BeCitizen';
import { AppProvider } from '@/contexts/AppContext';
@@ -60,11 +59,6 @@ function App() {
<WalletDashboard />
</ProtectedRoute>
} />
<Route path="/pool" element={
<ProtectedRoute>
<PoolDashboardPage />
</ProtectedRoute>
} />
<Route path="/reserves" element={
<ProtectedRoute>
<ReservesDashboardPage />
+1 -25
View File
@@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next';
import { useAuth } from '@/contexts/AuthContext';
import HeroSection from './HeroSection';
import TokenomicsSection from './TokenomicsSection';
import TokenSwap from './TokenSwap';
import PalletsGrid from './PalletsGrid';
import TeamSection from './TeamSection';
import ChainSpecs from './ChainSpecs';
@@ -48,7 +47,6 @@ const AppLayout: React.FC = () => {
const [showStaking, setShowStaking] = useState(false);
const [showP2P, setShowP2P] = useState(false);
const [showMultiSig, setShowMultiSig] = useState(false);
const [showTokenSwap, setShowTokenSwap] = useState(false);
const [showDEX, setShowDEX] = useState(false);
const { t } = useTranslation();
const { isConnected } = useWebSocket();
@@ -184,13 +182,6 @@ const AppLayout: React.FC = () => {
<Droplet className="w-4 h-4" />
DEX Pools
</button>
<button
onClick={() => setShowTokenSwap(true)}
className="w-full text-left px-4 py-2 text-gray-300 hover:bg-gray-800 hover:text-white flex items-center gap-2"
>
<Repeat className="w-4 h-4" />
Token Swap
</button>
<button
onClick={() => setShowP2P(true)}
className="w-full text-left px-4 py-2 text-gray-300 hover:bg-gray-800 hover:text-white flex items-center gap-2"
@@ -386,20 +377,6 @@ const AppLayout: React.FC = () => {
<P2PMarket />
</div>
</div>
) : showTokenSwap ? (
<div className="pt-20 min-h-screen bg-gray-950">
<div className="max-w-full mx-auto px-4">
<div className="text-center mb-12">
<h2 className="text-4xl font-bold mb-4 bg-gradient-to-r from-purple-500 via-pink-400 to-yellow-500 bg-clip-text text-transparent">
PEZ/HEZ Token Swap
</h2>
<p className="text-gray-400 text-lg max-w-3xl mx-auto">
Swap between PEZ and HEZ tokens instantly with real-time rates
</p>
</div>
<TokenSwap />
</div>
</div>
) : showMultiSig ? (
<div className="pt-20 min-h-screen bg-gray-950">
<div className="max-w-full mx-auto px-4">
@@ -438,7 +415,7 @@ const AppLayout: React.FC = () => {
)}
{(showDEX || showProposalWizard || showDelegation || showForum || showModeration || showTreasury || showStaking || showP2P || showMultiSig || showTokenSwap) && (
{(showDEX || showProposalWizard || showDelegation || showForum || showModeration || showTreasury || showStaking || showP2P || showMultiSig) && (
<div className="fixed bottom-8 right-8 z-50">
<button
onClick={() => {
@@ -451,7 +428,6 @@ const AppLayout: React.FC = () => {
setShowStaking(false);
setShowP2P(false);
setShowMultiSig(false);
setShowTokenSwap(false);
}}
className="bg-green-600 hover:bg-green-700 text-white px-6 py-3 rounded-full shadow-lg flex items-center gap-2 transition-all"
>
-25
View File
@@ -1,25 +0,0 @@
import React from 'react';
import { useNavigate } from 'react-router-dom';
import { ArrowLeft } from 'lucide-react';
import PoolDashboard from '@/components/PoolDashboard';
const PoolDashboardPage = () => {
const navigate = useNavigate();
return (
<div className="min-h-screen bg-gray-950 pt-24 pb-12">
<div className="container mx-auto px-4 py-8 relative">
<button
onClick={() => navigate('/wallet')}
className="absolute top-4 left-4 text-red-500 hover:text-red-400 transition-colors flex items-center gap-2 font-semibold"
>
<ArrowLeft className="w-5 h-5" />
<span>Back to Wallet</span>
</button>
<PoolDashboard />
</div>
</div>
);
};
export default PoolDashboardPage;
+1 -1
View File
@@ -69,7 +69,7 @@ const WalletDashboard: React.FC = () => {
</Button>
<Button
onClick={() => navigate('/pool')}
onClick={() => navigate('/')}
variant="outline"
className="border-blue-600 hover:bg-blue-900/20 text-blue-400 h-24 flex flex-col items-center justify-center"
>