Open danieldanielecki opened 2 years ago
The logic was on every screen, because when trying to put this in App.tsx (https://github.com/tamotam-com/tamotam-app/commit/c6a3605f0ae58b2cc4a3a61cb1568a663c0e719b) or navigation/index.tsx (https://github.com/tamotam-com/tamotam-app/commit/5619f8a5b2baf64215221bf3598b1ada69c33276) to avoid code duplication then whenever the internet was back, the user was redirected to the starting screen of the app. We want: when the internet is back, to be back on the screen where the user ended.
screen
App.tsx
navigation/index.tsx
The other solution causes several popups (https://github.com/tamotam-com/tamotam-app/commit/1693c0428fd1df718b4dbfe6a275402a96eaf677), but it is as we wanted to return the user to the same screen.
Currently, the final solution is to use Alert in App.tsx, whereas No Internet View on each screen (https://github.com/tamotam-com/tamotam-app/commit/9e599115298f9b98dd163f3f3b935b1dd6001c60).
Alert
No Internet View
Hopefully, someone will update here: https://stackoverflow.com/a/73080730/11127383
The logic was on every
screen
, because when trying to put this inApp.tsx
(https://github.com/tamotam-com/tamotam-app/commit/c6a3605f0ae58b2cc4a3a61cb1568a663c0e719b) ornavigation/index.tsx
(https://github.com/tamotam-com/tamotam-app/commit/5619f8a5b2baf64215221bf3598b1ada69c33276) to avoid code duplication then whenever the internet was back, the user was redirected to the startingscreen
of the app. We want: when the internet is back, to be back on the screen where the user ended.The other solution causes several popups (https://github.com/tamotam-com/tamotam-app/commit/1693c0428fd1df718b4dbfe6a275402a96eaf677), but it is as we wanted to return the user to the same screen.
Currently, the final solution is to use
Alert
inApp.tsx
, whereasNo Internet View
on each screen (https://github.com/tamotam-com/tamotam-app/commit/9e599115298f9b98dd163f3f3b935b1dd6001c60).Hopefully, someone will update here: https://stackoverflow.com/a/73080730/11127383