mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-15 11:59:21 +01:00
FIX: Wrong button during initial mount
This commit is contained in:
parent
89561c0762
commit
24adc7f57e
2 changed files with 11 additions and 14 deletions
|
@ -83,6 +83,7 @@ const DetailViewStackScreensStack = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const SaveButton = useMemo(() => <HeaderRightButton testID="Save" disabled={true} title={loc.wallets.details_save} />, []);
|
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 useWalletListScreenOptions = useMemo<NativeStackNavigationOptions>(() => {
|
||||||
const SettingsButton = (
|
const SettingsButton = (
|
||||||
|
@ -148,7 +149,14 @@ const DetailViewStackScreensStack = () => {
|
||||||
<DetailViewStack.Screen
|
<DetailViewStack.Screen
|
||||||
name="TransactionDetails"
|
name="TransactionDetails"
|
||||||
component={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
|
<DetailViewStack.Screen
|
||||||
name="TransactionStatus"
|
name="TransactionStatus"
|
||||||
|
@ -163,7 +171,7 @@ const DetailViewStackScreensStack = () => {
|
||||||
headerStyle: {
|
headerStyle: {
|
||||||
backgroundColor: theme.colors.customHeader,
|
backgroundColor: theme.colors.customHeader,
|
||||||
},
|
},
|
||||||
headerRight: () => SaveButton,
|
headerRight: () => DetailButton,
|
||||||
})(theme)}
|
})(theme)}
|
||||||
/>
|
/>
|
||||||
<DetailViewStack.Screen name="CPFP" component={CPFP} options={CPFP.navigationOptions(theme)} />
|
<DetailViewStack.Screen name="CPFP" component={CPFP} options={CPFP.navigationOptions(theme)} />
|
||||||
|
|
|
@ -12,7 +12,6 @@ import presentAlert from '../../components/Alert';
|
||||||
import CopyToClipboardButton from '../../components/CopyToClipboardButton';
|
import CopyToClipboardButton from '../../components/CopyToClipboardButton';
|
||||||
import HandOffComponent from '../../components/HandOffComponent';
|
import HandOffComponent from '../../components/HandOffComponent';
|
||||||
import HeaderRightButton from '../../components/HeaderRightButton';
|
import HeaderRightButton from '../../components/HeaderRightButton';
|
||||||
import navigationStyle from '../../components/navigationStyle';
|
|
||||||
import { useTheme } from '../../components/themes';
|
import { useTheme } from '../../components/themes';
|
||||||
import ToolTipMenu from '../../components/TooltipMenu';
|
import ToolTipMenu from '../../components/TooltipMenu';
|
||||||
import loc from '../../loc';
|
import loc from '../../loc';
|
||||||
|
@ -415,13 +414,3 @@ const styles = StyleSheet.create({
|
||||||
});
|
});
|
||||||
|
|
||||||
export default TransactionDetails;
|
export default TransactionDetails;
|
||||||
|
|
||||||
TransactionDetails.navigationOptions = navigationStyle({ headerTitle: loc.transactions.details_title }, (options, { theme }) => {
|
|
||||||
return {
|
|
||||||
...options,
|
|
||||||
statusBarStyle: 'auto',
|
|
||||||
headerStyle: {
|
|
||||||
backgroundColor: theme.colors.customHeader,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue