@@ -15,6 +15,8 @@ import Animated, {
1515} from 'react-native-reanimated' ;
1616import type { GoogleMapsViewRef } from 'react-native-google-maps-plus' ;
1717import { useAppTheme } from '../theme' ;
18+ import { useNavigation } from '@react-navigation/native' ;
19+ import type { RootNavigationProp } from '../types/navigation' ;
1820
1921export type ButtonItem = { title : string ; onPress : ( ) => void } ;
2022
@@ -25,6 +27,7 @@ type Props = {
2527
2628export default function ControlPanel ( { mapRef, buttons } : Props ) {
2729 const theme = useAppTheme ( ) ;
30+ const navigation = useNavigation < RootNavigationProp > ( ) ;
2831 const progress = useSharedValue ( 0 ) ;
2932
3033 const toggle = ( ) => {
@@ -36,6 +39,10 @@ export default function ControlPanel({ mapRef, buttons }: Props) {
3639 const finalButtons = useMemo (
3740 ( ) => [
3841 ...buttons ,
42+ {
43+ title : `Navigate to blank screen` ,
44+ onPress : ( ) => navigation . navigate ( 'Blank' ) ,
45+ } ,
3946 {
4047 title : 'Request location permission' ,
4148 onPress : async ( ) => {
@@ -57,7 +64,7 @@ export default function ControlPanel({ mapRef, buttons }: Props) {
5764 console . log ( mapRef . current ?. isGooglePlayServicesAvailable ( ) ) ,
5865 } ,
5966 ] ,
60- [ buttons , mapRef ]
67+ [ buttons , mapRef , navigation ]
6168 ) ;
6269
6370 const buttonHeight = 52 ;
0 commit comments