Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 04928342

Přidáno uživatelem Schwobik před téměř 2 roky(ů)

mergování a úprava kompatibility. proklik na detail itemu
re #10489

Zobrazit rozdíly:

src/components/listView/ItemPreview.tsx
1
import { Center, HStack, Image, Text, VStack } from "native-base"
1
import { Center, HStack, Image, Pressable, Text, VStack } from "native-base"
2 2
import { useEffect } from "react"
3
import { DrawerScreenProps } from "@react-navigation/drawer"
4
import { RootDrawerParamList } from "../Navigation"
3 5

  
4 6
interface ItemPreviewProps {
5 7
    caption: string
6 8
    title: string
7 9
    name?: string
8 10
    image?: string
11
    itemId: string
12
    navigation: any
9 13
}
10 14

  
11 15
const ItemPreview = (props: ItemPreviewProps) => {
......
16 20

  
17 21
    return (
18 22
        <>
19
            <HStack
20
                space={ 2 }
21
                flex={ 1 }
22
                alignItems={ "start" }
23
            <Pressable
24
                onPress={() => props.navigation.navigate("Item", {itemId: props.itemId})}
25
                key={props.itemId}
23 26
            >
24
                <Image
25
                    source={ {uri: `http:/147.228.173.159/static/images/${ props.image ? "thumb-" + props.image : "thumb-Rel-78.png" }`} }
26
                    size={ "sm" }
27
                    alt={ props.image ? props.image : "thumb-Rel-78.png" }
28
                />
29
                <VStack h={70}>
30
                    <Text fontSize={"sm"} italic>{ props.name }</Text>
31
                    <Text fontSize={"sm"} bold>{ props.caption }</Text>
32
                    <Text fontSize={"xs"}>{ props.title }</Text>
33
                </VStack>
34
            </HStack>
27
                <HStack
28
                    space={ 2 }
29
                    flex={ 1 }
30
                    alignItems={ "start" }
31
                >
32
                    <Image
33
                        source={ {uri: `http:/147.228.173.159/static/images/${ props.image ? "thumb-" + props.image : "thumb-Rel-78.png" }`} }
34
                        size={ "sm" }
35
                        alt={ props.image ? props.image : "thumb-Rel-78.png" }
36
                    />
37
                    <VStack h={70}>
38
                        <Text fontSize={"sm"} italic>{ props.name }</Text>
39
                        <Text fontSize={"sm"} bold>{ props.caption }</Text>
40
                        <Text fontSize={"xs"}>{ props.title }</Text>
41
                    </VStack>
42
                </HStack>
43
            </Pressable>
35 44
        </>
36 45
    )
37 46
}

Také k dispozici: Unified diff