e02c03e83d
- Add mobile hamburger menu with animated toggle (Header.js) - Add CopyButton component with clipboard API + toast notifications - Replace all loading spinners with skeleton loading screens - Add custom Toast notification system (no new dependencies) - Add dark/light theme toggle with localStorage persistence - Use CSS variables for theme-aware colors across all components - Build compiles successfully with zero warnings New files: CopyButton.js, Skeleton.js, Toast.js, ThemeContext.js Modified: All pages and components updated for UX improvements Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 lines
1.6 KiB
JavaScript
43 lines
1.6 KiB
JavaScript
import React from 'react';
|
|
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
|
import { ThemeProvider } from './contexts/ThemeContext';
|
|
import { ToastProvider } from './components/Toast';
|
|
import Header from './components/Header';
|
|
import Footer from './components/Footer';
|
|
import Home from './pages/Home';
|
|
import BlockDetail from './pages/BlockDetail';
|
|
import TransactionDetail from './pages/TransactionDetail';
|
|
import AddressDetail from './pages/AddressDetail';
|
|
import NetworkStats from './pages/NetworkStats';
|
|
import NodeMap from './pages/NodeMap';
|
|
import RichList from './pages/RichList';
|
|
import './App.css';
|
|
|
|
function App() {
|
|
return (
|
|
<ThemeProvider>
|
|
<ToastProvider>
|
|
<Router>
|
|
<div className="min-h-screen flex flex-col" style={{ backgroundColor: 'var(--bg-primary)', color: 'var(--text-primary)' }}>
|
|
<Header />
|
|
<main className="flex-grow container mx-auto px-4 py-8">
|
|
<Routes>
|
|
<Route path="/" element={<Home />} />
|
|
<Route path="/block/:hashOrHeight" element={<BlockDetail />} />
|
|
<Route path="/tx/:txid" element={<TransactionDetail />} />
|
|
<Route path="/address/:address" element={<AddressDetail />} />
|
|
<Route path="/stats" element={<NetworkStats />} />
|
|
<Route path="/nodes" element={<NodeMap />} />
|
|
<Route path="/richlist" element={<RichList />} />
|
|
</Routes>
|
|
</main>
|
|
<Footer />
|
|
</div>
|
|
</Router>
|
|
</ToastProvider>
|
|
</ThemeProvider>
|
|
);
|
|
}
|
|
|
|
export default App;
|