File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed
app/(drawer)/app-settings Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1
1
EXPO_PUBLIC_DEMO_API=false
2
- EXPO_PUBLIC_DISABLE_PIN_LOCK=false
2
+ EXPO_PUBLIC_DISABLE_PIN_LOCK=false
3
+ EXPO_PUBLIC_ENABLE_DEBUG_MENU=false
Original file line number Diff line number Diff line change @@ -32,13 +32,22 @@ const MENU_ROUTES = {
32
32
} ,
33
33
} as const ;
34
34
35
- const menuItems = Object . values ( MENU_ROUTES ) . map ( ( item ) => {
36
- return {
37
- title : item . title ,
38
- href : item . href ,
39
- path : item . href . concat ( "/index" ) ,
40
- } ;
41
- } ) ;
35
+ const menuItems = Object . entries ( MENU_ROUTES )
36
+ . map ( ( [ key , item ] ) => {
37
+ if (
38
+ key === "debug" &&
39
+ process . env . EXPO_PUBLIC_ENABLE_DEBUG_MENU !== "true"
40
+ ) {
41
+ return null ;
42
+ }
43
+
44
+ return {
45
+ title : item . title ,
46
+ href : item . href ,
47
+ path : item . href . concat ( "/index" ) ,
48
+ } ;
49
+ } )
50
+ . filter ( ( item ) => item !== null ) ;
42
51
43
52
export default function MenuScreen ( ) {
44
53
const router = useRouter ( ) ;
You can’t perform that action at this time.
0 commit comments