File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export function useSoftwareUpdatePoll(): void {
31
31
32
32
export function useProtocolReceiptToast ( ) : void {
33
33
const host = useHost ( )
34
- const { t } = useTranslation ( 'protocol_info' )
34
+ const { t, i18n } = useTranslation ( [ 'protocol_info' , 'shared' ] )
35
35
const { makeToast } = useToaster ( )
36
36
const queryClient = useQueryClient ( )
37
37
const protocolIdsQuery = useAllProtocolIdsQuery (
@@ -83,7 +83,7 @@ export function useProtocolReceiptToast(): void {
83
83
} ) as string ,
84
84
'success' ,
85
85
{
86
- closeButton : true ,
86
+ buttonText : i18n . format ( t ( 'shared:close' ) , 'capitalize' ) ,
87
87
disableTimeout : true ,
88
88
displayType : 'odd' ,
89
89
}
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export function useRecoveryToasts({
27
27
...rest
28
28
} : BuildToast ) : RecoveryToasts {
29
29
const { currentStepNumber, hasRunDiverged } = stepCounts
30
+ const { i18n, t } = useTranslation ( 'shared' )
30
31
const { makeToast } = useToaster ( )
31
32
const displayType = isOnDevice ? 'odd' : 'desktop'
32
33
@@ -53,6 +54,10 @@ export function useRecoveryToasts({
53
54
const makeSuccessToast = ( ) : void => {
54
55
if ( selectedRecoveryOption !== RECOVERY_MAP . CANCEL_RUN . ROUTE ) {
55
56
makeToast ( bodyText , 'success' , {
57
+ buttonText :
58
+ displayType === 'odd'
59
+ ? i18n . format ( t ( 'shared:close' ) , 'capitalize' )
60
+ : undefined ,
56
61
closeButton : true ,
57
62
disableTimeout : true ,
58
63
displayType,
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ export function SelectDestWells(props: SelectDestWellsProps): JSX.Element {
123
123
} ) as string ,
124
124
'error' ,
125
125
{
126
- closeButton : true ,
126
+ buttonText : i18n . format ( t ( 'shared:close' ) , 'capitalize' ) ,
127
127
disableTimeout : true ,
128
128
displayType : 'odd' ,
129
129
linkText : t ( 'learn_more' ) ,
You can’t perform that action at this time.
0 commit comments