Skip to content

Commit

Permalink
fix: retour vers la dernière écran dans la page custom notification (#…
Browse files Browse the repository at this point in the history
…189)

Signed-off-by: fc-santos <[email protected]>
  • Loading branch information
fc-santos authored Jan 8, 2025
1 parent ece0e82 commit e6d6e65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion app/src/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ const translation = {
ANIGAcceptDescription:
'From the account management, you will need to scan the QR code that will be presented to you.\r\n\r\nYou will then need to accept the certificate offer that will be proposed to you.',
ButtonTitle: 'Receive my attestation',
ButtonHome: 'Return to home page',
},
OptionsPlus: {
PageTitle: 'More options',
Expand Down
1 change: 0 additions & 1 deletion app/src/localization/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ const translation = {
ANIGAcceptDescription:
'Depuis la gestion de compte, vous devrez balayer le code QR qui vous sera présenté.\r\n\r\nVous devrez ensuite accepter l’offre d’attestation qui vous sera proposée.',
ButtonTitle: 'Recevoir mon attestation',
ButtonHome: 'Revenir à l’accueil',
},
OptionsPlus: {
PageTitle: "Plus d'option",
Expand Down
12 changes: 4 additions & 8 deletions app/src/screens/DefaultNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import {
testIdWithKey,
Screens,
NotificationStackParams,
TabStacks,
} from '@hyperledger/aries-bifold-core'
import { HomeStackParams } from '@hyperledger/aries-bifold-core/App/types/navigators'
import { useNavigation } from '@react-navigation/native'
import { StackScreenProps, StackNavigationProp } from '@react-navigation/stack'
import { StackScreenProps } from '@react-navigation/stack'
import { useTranslation } from 'react-i18next'
import { Linking, ScrollView, StyleSheet, Text, View } from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'
Expand All @@ -19,10 +16,9 @@ import { urlGestionDeCompteSag } from '../constants'

type DefaultProps = StackScreenProps<NotificationStackParams, Screens.CustomNotification>

const DefaultNotification: React.FC<DefaultProps> = () => {
const DefaultNotification: React.FC<DefaultProps> = ({ navigation }: DefaultProps) => {
const { ColorPallet, TextTheme } = useTheme()
const { t } = useTranslation()
const { navigate } = useNavigation<StackNavigationProp<HomeStackParams>>()

const styles = StyleSheet.create({
container: {
Expand Down Expand Up @@ -98,8 +94,8 @@ const DefaultNotification: React.FC<DefaultProps> = () => {
buttonType={ButtonType.Secondary}
testID={testIdWithKey('StartProcess')}
accessibilityLabel={t('DefaultNotificationPage.ButtonHome')}
title={t('DefaultNotificationPage.ButtonHome')}
onPress={() => navigate(TabStacks.HomeStack as never, { screen: Screens.Home } as never)}
title={t('Global.GoBack')}
onPress={() => navigation.goBack()}
></Button>
</View>
</SafeAreaView>
Expand Down

0 comments on commit e6d6e65

Please sign in to comment.