Added scrollview and send message button to notice
This commit is contained in:
@@ -10,7 +10,7 @@ import {ActivityIndicator, Dimensions, FlatList, View} from "react-native";
|
||||
import {useEffect, useState, useRef} from "react";
|
||||
import {useNoticesStore} from "@/store/noticesStore";
|
||||
import {useWishlist} from "@/store/wishlistStore";
|
||||
import {Pressable} from "react-native";
|
||||
import {Pressable, ScrollView} from "react-native";
|
||||
import {getUserById} from "@/api/client";
|
||||
|
||||
const {width} = Dimensions.get("window");
|
||||
@@ -131,7 +131,7 @@ export default function NoticeDetails() {
|
||||
<ActivityIndicator size="large" color="#3b82f6" />
|
||||
</Box>
|
||||
) : (
|
||||
<Box>
|
||||
<Box className="sticky top-0 z-10 bg-white">
|
||||
<FlatList
|
||||
ref={flatListRef}
|
||||
data={images}
|
||||
@@ -168,7 +168,9 @@ export default function NoticeDetails() {
|
||||
</Box>
|
||||
)}
|
||||
|
||||
|
||||
<ScrollView
|
||||
showsVerticalScrollIndicator={false}
|
||||
>
|
||||
<VStack className="p-2">
|
||||
<Text className="text-sm font-normal mb-2 text-typography-700">
|
||||
{notice.publishDate}
|
||||
@@ -226,6 +228,12 @@ export default function NoticeDetails() {
|
||||
<Text className="text-sm text-typography-700">
|
||||
Email: {user.email}
|
||||
</Text>
|
||||
<Pressable
|
||||
onPress={() => setIsMessageFormVisible(true)}
|
||||
className="mt-3 bg-primary-500 py-2 px-4 rounded-md"
|
||||
>
|
||||
<Text className="text-white text-center font-bold">Wyślij wiadomość</Text>
|
||||
</Pressable>
|
||||
</Box>
|
||||
) : (
|
||||
<Text>Błąd podczas ładowania danych użytkownika</Text>
|
||||
@@ -238,8 +246,8 @@ export default function NoticeDetails() {
|
||||
{notice.clientId}
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
</VStack>
|
||||
</ScrollView>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user