import React from 'react'
import PropTypes from 'prop-types'
import propTypesEmoji from 'src/prop-types/emoji'
import { StyleSheet, Text, View } from 'react-native'
import { Feather } from '@expo/vector-icons'
import Emojis from './Emojis'
export default function Actioned ({
action,
name,
emojis,
notification = false
}) {
let icon
let content
switch (action) {
case 'favourite':
icon = (
)
content = `${name} 喜欢了你的嘟嘟`
break
case 'follow':
icon = (
)
content = `${name} 开始关注你`
break
case 'poll':
icon = (
)
content = `你参与的投票已结束`
break
case 'reblog':
icon = (
)
content = `${name} 转嘟了${notification ? '你的嘟嘟' : ''}`
break
}
return (
{icon}
{content ? (
) : (
<>>
)}
)
}
const styles = StyleSheet.create({
actioned: {
flexDirection: 'row',
marginBottom: 8
},
icon: {
marginLeft: 50 - 12,
marginRight: 8
},
content: {
flexDirection: 'row'
}
})
Actioned.propTypes = {
action: PropTypes.oneOf(['favourite', 'follow', 'mention', 'poll', 'reblog'])
.isRequired,
name: PropTypes.string,
emojis: PropTypes.arrayOf(propTypesEmoji),
notification: PropTypes.bool
}