-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrong swipe back after token creation (#217)
* disable gesture nav on specific screens (ios) * disable gesture nav on dashboard (ios) * disable gesture nav on auth screen (ios) * add 'beforeRemove' nav listener, see #194 * update
- Loading branch information
Showing
7 changed files
with
79 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { TBeforeRemoveEvent } from '@model/nav' | ||
import { l } from '@src/logger' | ||
|
||
export function preventBack(e: TBeforeRemoveEvent, dispatch: (action: any) => void) { | ||
e.preventDefault() | ||
l({ | ||
payload: e.data.action.payload, | ||
type: e.data.action.type, | ||
source: e.data.action.source, | ||
target: e.data.action.target, | ||
}) | ||
// allow navigating to dashboard | ||
if (e.data.action.payload && 'name' in e.data.action.payload && e.data.action.payload.name === 'dashboard') { | ||
dispatch(e.data.action) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters