fixes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Link, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { KeyboardAvoidingView, Platform } from "react-native";
|
||||
import { Box } from "@/components/ui/box";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { Heading } from "@/components/ui/heading";
|
||||
@@ -287,8 +288,8 @@ export default function NoticeDetails() {
|
||||
</Box>
|
||||
</VStack>
|
||||
</ScrollView>
|
||||
{isMessageFormVisible && (
|
||||
<View className="absolute inset-0 bg-black bg-opacity-50 justify-center items-center z-20">
|
||||
{/* {isMessageFormVisible && (
|
||||
<View className="absolute inset-0 bg-black/50 bg-opacity-50 justify-center items-center z-20">
|
||||
<View className="bg-white p-4 rounded-lg w-4/5">
|
||||
<Text className="text-lg font-bold mb-4">
|
||||
Wyślij wiadomość do {user?.firstName}
|
||||
@@ -332,6 +333,57 @@ export default function NoticeDetails() {
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
)} */}
|
||||
{isMessageFormVisible && (
|
||||
<KeyboardAvoidingView
|
||||
behavior={Platform.OS === "ios" ? "padding" : "height"}
|
||||
className="absolute inset-0 bg-black/50 justify-center items-center z-20"
|
||||
>
|
||||
<View className="bg-white p-4 rounded-lg w-4/5 max-h-4/5">
|
||||
<ScrollView showsVerticalScrollIndicator={false}>
|
||||
<Text className="text-lg font-bold mb-4">
|
||||
Wyślij wiadomość do {user?.firstName}
|
||||
</Text>
|
||||
|
||||
<Text className="text-sm font-medium mb-1">Do:</Text>
|
||||
<Text className="bg-gray-100 p-3 rounded text-gray-500">
|
||||
{user?.email || "Brak adresu e-mail"}
|
||||
</Text>
|
||||
<Text className="text-sm font-medium mb-1">Twój e-mail:</Text>
|
||||
<TextInput
|
||||
className="border border-gray-300 p-2 rounded mb-4"
|
||||
placeholder="Wpisz swój adres e-mail"
|
||||
value={Email}
|
||||
onChangeText={setEmail}
|
||||
/>
|
||||
|
||||
<TextInput
|
||||
className="border border-gray-300 rounded-md p-2 mb-4 h-32 text-left"
|
||||
multiline
|
||||
numberOfLines={4}
|
||||
placeholder="Napisz swoją wiadomość..."
|
||||
value={message}
|
||||
onChangeText={setMessage}
|
||||
/>
|
||||
|
||||
<View className="flex-row justify-end space-x-2">
|
||||
<Pressable
|
||||
onPress={() => setIsMessageFormVisible(false)}
|
||||
className="bg-gray-300 py-2 px-4 rounded-md"
|
||||
>
|
||||
<Text className="text-gray-800">Anuluj</Text>
|
||||
</Pressable>
|
||||
|
||||
<Pressable
|
||||
onPress={handleSendMessage}
|
||||
className="bg-primary-500 py-2 px-4 rounded-md"
|
||||
>
|
||||
<Text className="text-white">Wyślij</Text>
|
||||
</Pressable>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
</KeyboardAvoidingView>
|
||||
)}
|
||||
</Card>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user