fix: AuthContext hoisting error and add presale launchpad UI

Frontend improvements for production readiness:
- Fixed AuthContext function hoisting issue (checkAdminStatus before use)
- Added complete Presale Launchpad UI (PresaleList, CreatePresale, PresaleDetail)
- Integrated with pallet-presale blockchain functionality
- Updated App.tsx routing for launchpad pages

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-20 18:32:08 +03:00
parent 3524f5c5c6
commit 9de2d853aa
5 changed files with 1360 additions and 31 deletions
+6
View File
@@ -38,6 +38,9 @@ const EducationPlatform = lazy(() => import('./pages/EducationPlatform'));
const P2PPlatform = lazy(() => import('./pages/P2PPlatform'));
const DEXDashboard = lazy(() => import('./components/dex/DEXDashboard').then(m => ({ default: m.DEXDashboard })));
const Presale = lazy(() => import('./pages/Presale'));
const PresaleList = lazy(() => import('./pages/launchpad/PresaleList'));
const PresaleDetail = lazy(() => import('./pages/launchpad/PresaleDetail'));
const CreatePresale = lazy(() => import('./pages/launchpad/CreatePresale'));
const NotFound = lazy(() => import('@/pages/NotFound'));
// Loading component
@@ -139,6 +142,9 @@ function App() {
</ProtectedRoute>
} />
<Route path="/presale" element={<Presale />} />
<Route path="/launchpad" element={<PresaleList />} />
<Route path="/launchpad/:id" element={<PresaleDetail />} />
<Route path="/launchpad/create" element={<CreatePresale />} />
<Route path="*" element={<NotFound />} />
</Routes>
</Suspense>