refactor load latest btn
This commit is contained in:
parent
fc9e28ca72
commit
0fd5c9294a
4 changed files with 7 additions and 7 deletions
|
@ -25,11 +25,11 @@ export const LoadLatestBtn = ({
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
hitSlop={HITSLOP}
|
hitSlop={HITSLOP}
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
accessibilityLabel={`Load new ${label}`}
|
accessibilityLabel={label}
|
||||||
accessibilityHint="">
|
accessibilityHint="">
|
||||||
<Text type="md-bold" style={pal.text}>
|
<Text type="md-bold" style={pal.text}>
|
||||||
<UpIcon size={16} strokeWidth={1} style={[pal.text, styles.icon]} />
|
<UpIcon size={16} strokeWidth={1} style={[pal.text, styles.icon]} />
|
||||||
Load new {label}
|
{label}
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)
|
)
|
||||||
|
|
|
@ -25,15 +25,15 @@ export const LoadLatestBtn = observer(
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
hitSlop={HITSLOP}
|
hitSlop={HITSLOP}
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
accessibilityLabel={`Load new ${label}`}
|
accessibilityLabel={label}
|
||||||
accessibilityHint={`Loads new ${label}`}>
|
accessibilityHint={label}>
|
||||||
<LinearGradient
|
<LinearGradient
|
||||||
colors={[gradients.blueLight.start, gradients.blueLight.end]}
|
colors={[gradients.blueLight.start, gradients.blueLight.end]}
|
||||||
start={{x: 0, y: 0}}
|
start={{x: 0, y: 0}}
|
||||||
end={{x: 1, y: 1}}
|
end={{x: 1, y: 1}}
|
||||||
style={styles.loadLatestInner}>
|
style={styles.loadLatestInner}>
|
||||||
<Text type="md-bold" style={styles.loadLatestText}>
|
<Text type="md-bold" style={styles.loadLatestText}>
|
||||||
Load new {label}
|
{label}
|
||||||
</Text>
|
</Text>
|
||||||
</LinearGradient>
|
</LinearGradient>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
|
@ -258,7 +258,7 @@ const FeedPage = observer(
|
||||||
headerOffset={HEADER_OFFSET}
|
headerOffset={HEADER_OFFSET}
|
||||||
/>
|
/>
|
||||||
{feed.hasNewLatest && !feed.isRefreshing && (
|
{feed.hasNewLatest && !feed.isRefreshing && (
|
||||||
<LoadLatestBtn onPress={onPressLoadLatest} label="posts" />
|
<LoadLatestBtn onPress={onPressLoadLatest} label="Load new posts" />
|
||||||
)}
|
)}
|
||||||
<FAB
|
<FAB
|
||||||
testID="composeFAB"
|
testID="composeFAB"
|
||||||
|
|
|
@ -98,7 +98,7 @@ export const NotificationsScreen = withAuthRequired(
|
||||||
/>
|
/>
|
||||||
{store.me.notifications.hasNewLatest &&
|
{store.me.notifications.hasNewLatest &&
|
||||||
!store.me.notifications.isRefreshing && (
|
!store.me.notifications.isRefreshing && (
|
||||||
<LoadLatestBtn onPress={onPressLoadLatest} label="notifications" />
|
<LoadLatestBtn onPress={onPressLoadLatest} label="Load new notifications" />
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue