mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
Migrate to Telegram Navigator integration
Replace manual BackButton management with official @telegram-apps/react-router-integration to fix navigation issues (back button cycling and double-click). Changes: - Migrate from @tma.js/sdk-react to @telegram-apps/sdk-react - Downgrade react-router-dom to v6 for package compatibility - Add AppWithNavigator component with Telegram navigator integration - Use browser history mode (hashMode: null) to prevent hash URLs - Add multi-level platform detection (user data, platform, version) - Add try-catch error handling for navigator attach/detach - Simplify useBackButton hook to no-op (navigator handles automatically) - Update vite config with new Telegram packages The navigator automatically manages BackButton based on router history, falling back to BrowserRouter in regular browser environment.
This commit is contained in:
@@ -49,7 +49,11 @@ export default defineConfig({
|
||||
'@radix-ui/react-visually-hidden',
|
||||
],
|
||||
'vendor-dnd': ['@dnd-kit/core', '@dnd-kit/sortable', '@dnd-kit/utilities'],
|
||||
'vendor-telegram': ['@tma.js/sdk-react'],
|
||||
'vendor-telegram': [
|
||||
'@telegram-apps/sdk',
|
||||
'@telegram-apps/sdk-react',
|
||||
'@telegram-apps/react-router-integration',
|
||||
],
|
||||
'vendor-utils': [
|
||||
'axios',
|
||||
'zustand',
|
||||
|
||||
Reference in New Issue
Block a user