refactor load latest btn

zio/stable
Ansh Nanda 2023-05-23 15:33:27 -07:00
parent fc9e28ca72
commit 0fd5c9294a
4 changed files with 7 additions and 7 deletions

View File

@ -25,11 +25,11 @@ export const LoadLatestBtn = ({
onPress={onPress}
hitSlop={HITSLOP}
accessibilityRole="button"
accessibilityLabel={`Load new ${label}`}
accessibilityLabel={label}
accessibilityHint="">
<Text type="md-bold" style={pal.text}>
<UpIcon size={16} strokeWidth={1} style={[pal.text, styles.icon]} />
Load new {label}
{label}
</Text>
</TouchableOpacity>
)

View File

@ -25,15 +25,15 @@ export const LoadLatestBtn = observer(
onPress={onPress}
hitSlop={HITSLOP}
accessibilityRole="button"
accessibilityLabel={`Load new ${label}`}
accessibilityHint={`Loads new ${label}`}>
accessibilityLabel={label}
accessibilityHint={label}>
<LinearGradient
colors={[gradients.blueLight.start, gradients.blueLight.end]}
start={{x: 0, y: 0}}
end={{x: 1, y: 1}}
style={styles.loadLatestInner}>
<Text type="md-bold" style={styles.loadLatestText}>
Load new {label}
{label}
</Text>
</LinearGradient>
</TouchableOpacity>

View File

@ -258,7 +258,7 @@ const FeedPage = observer(
headerOffset={HEADER_OFFSET}
/>
{feed.hasNewLatest && !feed.isRefreshing && (
<LoadLatestBtn onPress={onPressLoadLatest} label="posts" />
<LoadLatestBtn onPress={onPressLoadLatest} label="Load new posts" />
)}
<FAB
testID="composeFAB"

View File

@ -98,7 +98,7 @@ export const NotificationsScreen = withAuthRequired(
/>
{store.me.notifications.hasNewLatest &&
!store.me.notifications.isRefreshing && (
<LoadLatestBtn onPress={onPressLoadLatest} label="notifications" />
<LoadLatestBtn onPress={onPressLoadLatest} label="Load new notifications" />
)}
</View>
)