diff --git a/frontend/src/components/gallery/AddToGalleryModal.tsx b/frontend/src/components/gallery/AddToGalleryModal.tsx index 15da13d..e9a389f 100644 --- a/frontend/src/components/gallery/AddToGalleryModal.tsx +++ b/frontend/src/components/gallery/AddToGalleryModal.tsx @@ -72,7 +72,7 @@ export default function AddToGalleryModal({ type="button" disabled={adding} onClick={() => void handleAddToGallery(gallery.id)} - className="rounded-lg border border-gray-200 px-4 py-3 text-left transition disabled:opacity-50 hover:bg-gray-100 dark:border-[#504b46] dark:hover:bg-[#35322e]" + className="rounded-lg border border-gray-200 px-4 py-3 text-left wrap-anywhere transition disabled:opacity-50 hover:bg-gray-100 dark:border-[#504b46] dark:hover:bg-[#35322e]" > {gallery.title} diff --git a/frontend/src/components/gallery/CreateGalleryModal.tsx b/frontend/src/components/gallery/CreateGalleryModal.tsx index e6eb4d7..8244961 100644 --- a/frontend/src/components/gallery/CreateGalleryModal.tsx +++ b/frontend/src/components/gallery/CreateGalleryModal.tsx @@ -1,5 +1,5 @@ import { LucideX } from "lucide-react"; -import { useState } from "react"; +import { useState, useEffect, useRef } from "react"; import { useCreateGallery } from "../../hooks/gallery/useCreateGallery"; type CreateGalleryModalProps = { @@ -13,6 +13,15 @@ export default function CreateGalleryModal({ const [error, setError] = useState(""); const { createGallery, isCreating } = useCreateGallery(); + const dialogRef = useRef(null); + + useEffect(() => { + const dialog = dialogRef.current; + if (!dialog) return; + + dialog.showModal(); + return () => dialog.close(); + }, []); async function handleCreateGallery() { if (!title.trim() || isCreating) return; diff --git a/frontend/src/components/gallery/GalleryHeader.tsx b/frontend/src/components/gallery/GalleryHeader.tsx index dd1e5a3..a39b8a7 100644 --- a/frontend/src/components/gallery/GalleryHeader.tsx +++ b/frontend/src/components/gallery/GalleryHeader.tsx @@ -81,8 +81,8 @@ export default function GalleryHeader({ ) : ( -
-

+
+

{title}

@@ -92,7 +92,7 @@ export default function GalleryHeader({ onClick={() => onStartRenaming(title)} aria-label="Rename gallery" title="Rename gallery" - className="inline-flex min-h-11 min-w-11 shrink-0 cursor-pointer items-center justify-center rounded-full text-gray-600 hover:bg-gray-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-700 dark:focus-visible:outline-[#e6dfd6] dark:text-gray-300 dark:hover:bg-[#302e2a]" + className="inline-flex ml-3 align-middle sm:ml-0 min-h-11 min-w-11 shrink-0 cursor-pointer items-center justify-center rounded-full text-gray-600 hover:bg-gray-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-700 dark:focus-visible:outline-[#e6dfd6] dark:text-gray-300 dark:hover:bg-[#302e2a]" >