import React, { useState } from 'react'; import { View, Text, Button, TextInput, StyleSheet } from 'react-native'; import { doc, updateDoc } from 'firebase/firestore'; import { db } from '../config/firebase'; function ProjectDetailsScreen({ route, navigation }: any) { const { project } = route.params; const [name, setName] = useState(project.name); const [status, setStatus] = useState(project.status); const updateProject = async () => { await updateDoc(doc(db, 'projects', project.id), { name, status }); alert('Projekt frissítve'); navigation.goBack(); }; const toggleStatus = () => { setStatus(status === 'aktív' ? 'lezárt' : 'aktív'); }; return ( Státusz: {status}