text: import { useEffect, useState } from "react";
  
  const ProjectFormUpdate = ({ project, crud, toggleShow }) => {
    const [name, setName] = useState("");
    const [description, setDescription] = useState("");
    const updateName = (e) => {
      setName(e.target.value);
    };
    const updateDescription = (e) => {
      setDescription(e.target.value);
    };
  
    const updateProject = () => {
      crud.update({
        name: name,
        description: description,
      });
      toggleShow();
    };
  
    useEffect(() => {
      setName(project.name);
      setDescription(project.description);
    }, [project]);
  
    return (
      <div className="ticket-form">
        <label>Name:</label>
        <input type="text" value={name} onChange={updateName} />
        <label>Description:</label>
        <input type="text" value={description} onChange={updateDescription} />
        <button onClick={updateProject}>Submit</button>
      </div>
    );
  };
  export default ProjectFormUpdate;
  