FIX: Wrong button during initial mount

This commit is contained in:
Marcos Rodriguez Velez 2024-06-01 22:57:19 -04:00
parent 89561c0762
commit 24adc7f57e
No known key found for this signature in database
GPG key ID: 6030B2F48CCE86D7
2 changed files with 11 additions and 14 deletions

View file

@ -83,6 +83,7 @@ const DetailViewStackScreensStack = () => {
};
const SaveButton = useMemo(() => <HeaderRightButton testID="Save" disabled={true} title={loc.wallets.details_save} />, []);
const DetailButton = useMemo(() => <HeaderRightButton testID="DetailButton" disabled={true} title={loc.send.create_details} />, []);
const useWalletListScreenOptions = useMemo<NativeStackNavigationOptions>(() => {
const SettingsButton = (
@ -148,7 +149,14 @@ const DetailViewStackScreensStack = () => {
<DetailViewStack.Screen
name="TransactionDetails"
component={TransactionDetails}
options={TransactionDetails.navigationOptions(theme)}
options={navigationStyle({
statusBarStyle: 'auto',
headerStyle: {
backgroundColor: theme.colors.customHeader,
},
headerTitle: loc.transactions.details_title,
headerRight: () => DetailButton,
})(theme)}
/>
<DetailViewStack.Screen
name="TransactionStatus"
@ -163,7 +171,7 @@ const DetailViewStackScreensStack = () => {
headerStyle: {
backgroundColor: theme.colors.customHeader,
},
headerRight: () => SaveButton,
headerRight: () => DetailButton,
})(theme)}
/>
<DetailViewStack.Screen name="CPFP" component={CPFP} options={CPFP.navigationOptions(theme)} />

View file

@ -12,7 +12,6 @@ import presentAlert from '../../components/Alert';
import CopyToClipboardButton from '../../components/CopyToClipboardButton';
import HandOffComponent from '../../components/HandOffComponent';
import HeaderRightButton from '../../components/HeaderRightButton';
import navigationStyle from '../../components/navigationStyle';
import { useTheme } from '../../components/themes';
import ToolTipMenu from '../../components/TooltipMenu';
import loc from '../../loc';
@ -414,14 +413,4 @@ const styles = StyleSheet.create({
},
});
export default TransactionDetails;
TransactionDetails.navigationOptions = navigationStyle({ headerTitle: loc.transactions.details_title }, (options, { theme }) => {
return {
...options,
statusBarStyle: 'auto',
headerStyle: {
backgroundColor: theme.colors.customHeader,
},
};
});
export default TransactionDetails;