diff --git a/apps/infoalloggi/src/components/notePopover.tsx b/apps/infoalloggi/src/components/notePopover.tsx new file mode 100644 index 0000000..eb31edc --- /dev/null +++ b/apps/infoalloggi/src/components/notePopover.tsx @@ -0,0 +1,71 @@ +import { NotebookPen } from "lucide-react"; +import { useState } from "react"; +import LoadingButton from "~/components/custom_ui/loading-button"; +import { Button } from "~/components/ui/button"; +import { + Popover, + PopoverContent, + PopoverDescription, + PopoverHeader, + PopoverTitle, + PopoverTrigger, +} from "~/components/ui/popover"; +import { Textarea } from "~/components/ui/textarea"; +import type { UsersId } from "~/schemas/public/Users"; + +export const NotePopover = ({ + userId, + note, + mutate, + isPending, +}: { + userId: UsersId; + note: string | null; + mutate: (data: { id: UsersId; data: { note: string | null } }) => void; + isPending: boolean; +}) => { + const [newNote, setNewNote] = useState(note); + + return ( + + +
+ + {note && note.trim().length > 0 && ( + + + + )} +
+
+ + + Annunci Inseriti + Desc + +
+