File tree Expand file tree Collapse file tree 5 files changed +4
-8
lines changed
Expand file tree Collapse file tree 5 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,6 @@ import theme from "@/styles/theme";
1010
1111console . log ( `You're connected to the ${ network } network!` ) ;
1212
13- const tele = ( window as any ) . Telegram . WebApp ;
14-
15- if ( tele ) {
16- tele . ready ( ) ;
17- tele . enableClosingConfirmation ( ) ;
18- }
19-
2013const App = ( ) => {
2114 return (
2215 < ThemeProvider theme = { theme } >
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ const Amount = () => {
6363 if ( tele ) {
6464 tele . ready ( ) ;
6565 tele . BackButton . show ( ) ;
66+ tele . enableClosingConfirmation ( ) ;
6667 tele . onEvent ( "backButtonClicked" , ( ) => navigate ( "/" ) ) ;
6768 return ( ) => {
6869 tele . offEvent ( "backButtonClicked" ) ;
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ const Leverage = () => {
3939 if ( tele ) {
4040 tele . ready ( ) ;
4141 tele . BackButton . show ( ) ;
42+ tele . enableClosingConfirmation ( ) ;
4243 tele . onEvent ( "backButtonClicked" , ( ) => {
4344 navigate ( "/stake/nominator" ) ;
4445 } ) ;
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import { globalError } from "@/lib/atom/globalError";
2121import { stakingAtom , stakingInputAtom } from "@/lib/atom/staking" ;
2222import { isDevMode } from "@/utils/isDevMode" ;
2323
24-
2524const tele = ( window as any ) . Telegram . WebApp ;
2625
2726interface ModalState {
@@ -100,6 +99,7 @@ const NFTPreview = () => {
10099 if ( tele ) {
101100 tele . ready ( ) ;
102101 tele . BackButton . show ( ) ;
102+ tele . enableClosingConfirmation ( ) ;
103103 tele . onEvent ( "backButtonClicked" , ( ) => {
104104 navigate ( "/stake/leverage" ) ;
105105 } ) ;
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ const NominatorList = () => {
4343 if ( tele ) {
4444 tele . ready ( ) ;
4545 tele . BackButton . show ( ) ;
46+ tele . enableClosingConfirmation ( ) ;
4647 tele . onEvent ( "backButtonClicked" , ( ) => {
4748 navigate ( "/stake/amount" ) ;
4849 } ) ;
You can’t perform that action at this time.
0 commit comments