diff --git a/components/SignRequest.tsx b/components/SignRequest.tsx index 6c0bcf9..1c53a16 100644 --- a/components/SignRequest.tsx +++ b/components/SignRequest.tsx @@ -1,12 +1,13 @@ import React, { useEffect, useMemo, useState } from 'react'; import { Alert, Image, ScrollView, View } from 'react-native'; -import { ActivityIndicator, Button, Text } from 'react-native-paper'; +import { ActivityIndicator, Button, Text, Appbar } from 'react-native-paper'; import { useNavigation } from '@react-navigation/native'; import { NativeStackNavigationProp, NativeStackScreenProps, } from '@react-navigation/native-stack'; +import { getHeaderTitle } from '@react-navigation/elements'; import { Account, StackParamsList } from '../types'; import AccountDetails from './AccountDetails'; @@ -160,6 +161,27 @@ const SignRequest = ({ route }: SignRequestProps) => { navigation.navigate('Laconic'); }; + navigation.setOptions({ + // eslint-disable-next-line react/no-unstable-nested-components + header: ({ options, back }) => { + const title = getHeaderTitle(options, route.name); + + return ( + + {back && ( + { + await rejectRequestHandler(); + navigation.navigate('Laconic'); + }} + /> + )} + + + ); + }, + }); + return ( <> {isLoading ? (