about summary refs log tree commit diff
path: root/src/view/com/algos/AlgoItem.tsx
blob: 57a1428e68e025711730ab73f1430501d56108b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import React from 'react'
import {StyleSheet, View} from 'react-native'
import {Text} from '../util/text/Text'
import {AppBskyFeedDefs} from '@atproto/api'
import {usePalette} from 'lib/hooks/usePalette'
import {s} from 'lib/styles'
import {UserAvatar} from '../util/UserAvatar'

const AlgoItem = ({item}: {item: AppBskyFeedDefs.GeneratorView}) => {
  const pal = usePalette('default')
  return (
    <View style={[styles.container]} key={item.uri}>
      <View style={[styles.headerContainer]}>
        <View style={[s.mr20]}>
          <UserAvatar size={56} avatar={item.avatar} />
        </View>
        <View style={[styles.headerTextContainer]}>
          <Text style={[pal.text, s.bold]}>
            {item.displayName ?? 'Feed name'}
          </Text>
          <Text style={[pal.textLight, styles.description]}>
            {item.description ??
              'THIS IS A FEED DESCRIPTION, IT WILL TELL YOU WHAT THE FEED IS ABOUT. THIS IS A COOL FEED ABOUT COOL PEOPLE.'}
          </Text>
        </View>
      </View>

      {/* TODO: this feed is like by *3* people UserAvatars and others */}
    </View>
  )
}

export default AlgoItem

const styles = StyleSheet.create({
  container: {
    paddingHorizontal: 18,
    paddingVertical: 20,
    flexDirection: 'column',
    columnGap: 36,
    flex: 1,
    borderTopWidth: 1,
    borderTopColor: '#E5E5E5',
  },
  headerContainer: {
    flexDirection: 'row',
  },
  headerTextContainer: {
    flexDirection: 'column',
    columnGap: 4,
    flex: 1,
  },
  description: {
    flex: 1,
    flexWrap: 'wrap',
  },
})