File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -933,7 +933,9 @@ type SettingsNavigatorParamList = {
933933 /** cardID of selected card */
934934 cardID : string ;
935935 } ;
936- [ SCREENS . KEYBOARD_SHORTCUTS ] : undefined ;
936+ [ SCREENS . KEYBOARD_SHORTCUTS ] : {
937+ backTo : Routes ;
938+ } ;
937939 [ SCREENS . SETTINGS . EXIT_SURVEY . REASON ] : undefined ;
938940 [ SCREENS . SETTINGS . EXIT_SURVEY . RESPONSE ] : {
939941 [ EXIT_SURVEY_REASON_FORM_INPUT_IDS . REASON ] : ValueOf < typeof CONST . EXIT_SURVEY . REASONS > ;
Original file line number Diff line number Diff line change 1+ import { RouteProp } from '@react-navigation/native' ;
12import React from 'react' ;
23import { View } from 'react-native' ;
34import HeaderWithBackButton from '@components/HeaderWithBackButton' ;
@@ -9,21 +10,23 @@ import useLocalize from '@hooks/useLocalize';
910import useThemeStyles from '@hooks/useThemeStyles' ;
1011import KeyboardShortcut from '@libs/KeyboardShortcut' ;
1112import Navigation from '@libs/Navigation/Navigation' ;
13+ import { SettingsNavigatorParamList } from '@libs/Navigation/types' ;
1214import CONST from '@src/CONST' ;
13- import type { Route as Routes } from '@src/ROUTES ' ;
15+ import SCREENS from '@src/SCREENS ' ;
1416
1517type Shortcut = {
1618 displayName : string ;
1719 descriptionKey : 'search' | 'newChat' | 'openShortcutDialog' | 'escape' | 'copy' ;
1820} ;
1921
2022type KeyboardShortcutsPageProps = {
21- backTo : Routes ;
23+ route : RouteProp < SettingsNavigatorParamList , typeof SCREENS . KEYBOARD_SHORTCUTS > ;
2224} ;
2325
24- function KeyboardShortcutsPage ( { backTo } : KeyboardShortcutsPageProps ) {
26+ function KeyboardShortcutsPage ( { route } : KeyboardShortcutsPageProps ) {
2527 const styles = useThemeStyles ( ) ;
2628 const { translate} = useLocalize ( ) ;
29+ const backTo = route . params . backTo ;
2730 const shortcuts = Object . values ( CONST . KEYBOARD_SHORTCUTS )
2831 . map ( ( shortcut ) => {
2932 const platformAdjustedModifiers = KeyboardShortcut . getPlatformEquivalentForKeys ( shortcut . modifiers ) ;
You can’t perform that action at this time.
0 commit comments