git ssb

1+

Daan Patchwork / manyverse



Commit ef7f4f1231acf9e37936df2ffa041089f5425c32

dx: refactor to add react keys in rendering TopBar

Andre Staltz committed on 4/29/2020, 3:33:56 PM
Parent: feab8686fe3b62d21cac16f5c5aa4c414561d01b

Files changed

src/frontend/components/TopBar.tschanged
src/frontend/components/TopBar.tsView
@@ -65,16 +65,17 @@
6565 public render() {
6666 const {title, onPressBack} = this.props;
6767 return $(View, {style: styles.container}, [
6868 $(HeaderButton, {
69+ key: 'back',
6970 onPress: onPressBack,
7071 icon: Platform.select({ios: 'chevron-left', default: 'arrow-left'}),
7172 ...Platform.select({ios: {iconSize: Dimensions.iconSizeLarge}}),
7273 accessibilityLabel: 'Back Button',
7374 }),
74- title ? $(Text, {style: styles.title}, title) : null,
75+ title ? $(Text, {key: 'title', style: styles.title}, title) : null,
7576 this.props.children
76- ? $(View, {style: styles.rightSide}, this.props.children)
77+ ? $(View, {key: 'right', style: styles.rightSide}, this.props.children)
7778 : null,
7879 ]);
7980 }
8081 }

Built with git-ssb-web