2020-12-12 18:22:22 +01:00
|
|
|
|
import { Feather } from '@expo/vector-icons'
|
|
|
|
|
import React from 'react'
|
2020-12-12 22:19:18 +01:00
|
|
|
|
import { ActivityIndicator, StyleSheet, Text, View } from 'react-native'
|
2020-12-13 14:04:25 +01:00
|
|
|
|
import { StyleConstants } from '@utils/styles/constants'
|
|
|
|
|
import { useTheme } from '@utils/styles/ThemeManager'
|
2020-12-12 18:22:22 +01:00
|
|
|
|
|
2020-12-12 22:19:18 +01:00
|
|
|
|
export interface Props {
|
|
|
|
|
isFetchingMore: false | 'previous' | 'next' | undefined
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TimelineEnd: React.FC<Props> = ({ isFetchingMore }) => {
|
2020-12-12 18:22:22 +01:00
|
|
|
|
const { theme } = useTheme()
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<View style={styles.base}>
|
2020-12-12 22:19:18 +01:00
|
|
|
|
{isFetchingMore ? (
|
|
|
|
|
<ActivityIndicator />
|
|
|
|
|
) : (
|
|
|
|
|
<Text style={[styles.text, { color: theme.secondary }]}>
|
|
|
|
|
居然刷到底了,喝杯{' '}
|
|
|
|
|
<Feather
|
|
|
|
|
name='coffee'
|
|
|
|
|
size={StyleConstants.Font.Size.S}
|
|
|
|
|
color={theme.secondary}
|
|
|
|
|
/>{' '}
|
|
|
|
|
吧
|
|
|
|
|
</Text>
|
|
|
|
|
)}
|
2020-12-12 18:22:22 +01:00
|
|
|
|
</View>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
|
base: {
|
|
|
|
|
flex: 1,
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
padding: StyleConstants.Spacing.M
|
|
|
|
|
},
|
|
|
|
|
text: {
|
|
|
|
|
fontSize: StyleConstants.Font.Size.S,
|
|
|
|
|
marginLeft: StyleConstants.Spacing.S
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export default TimelineEnd
|