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 {useEffect, useState, useRef} from "react";
|
||||||
import {useNoticesStore} from "@/store/noticesStore";
|
import {useNoticesStore} from "@/store/noticesStore";
|
||||||
import {useWishlist} from "@/store/wishlistStore";
|
import {useWishlist} from "@/store/wishlistStore";
|
||||||
import {Pressable} from "react-native";
|
import {Pressable, ScrollView} from "react-native";
|
||||||
import {getUserById} from "@/api/client";
|
import {getUserById} from "@/api/client";
|
||||||
|
|
||||||
const {width} = Dimensions.get("window");
|
const {width} = Dimensions.get("window");
|
||||||
@@ -131,7 +131,7 @@ export default function NoticeDetails() {
|
|||||||
<ActivityIndicator size="large" color="#3b82f6" />
|
<ActivityIndicator size="large" color="#3b82f6" />
|
||||||
</Box>
|
</Box>
|
||||||
) : (
|
) : (
|
||||||
<Box>
|
<Box className="sticky top-0 z-10 bg-white">
|
||||||
<FlatList
|
<FlatList
|
||||||
ref={flatListRef}
|
ref={flatListRef}
|
||||||
data={images}
|
data={images}
|
||||||
@@ -168,7 +168,9 @@ export default function NoticeDetails() {
|
|||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
showsVerticalScrollIndicator={false}
|
||||||
|
>
|
||||||
<VStack className="p-2">
|
<VStack className="p-2">
|
||||||
<Text className="text-sm font-normal mb-2 text-typography-700">
|
<Text className="text-sm font-normal mb-2 text-typography-700">
|
||||||
{notice.publishDate}
|
{notice.publishDate}
|
||||||
@@ -226,6 +228,12 @@ export default function NoticeDetails() {
|
|||||||
<Text className="text-sm text-typography-700">
|
<Text className="text-sm text-typography-700">
|
||||||
Email: {user.email}
|
Email: {user.email}
|
||||||
</Text>
|
</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>
|
</Box>
|
||||||
) : (
|
) : (
|
||||||
<Text>Błąd podczas ładowania danych użytkownika</Text>
|
<Text>Błąd podczas ładowania danych użytkownika</Text>
|
||||||
@@ -238,8 +246,8 @@ export default function NoticeDetails() {
|
|||||||
{notice.clientId}
|
{notice.clientId}
|
||||||
</Text>
|
</Text>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
</VStack>
|
</VStack>
|
||||||
|
</ScrollView>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user