diff --git a/app/components/ImageComment.tsx b/app/components/ImageComment.tsx index 92c0fd6..64879db 100644 --- a/app/components/ImageComment.tsx +++ b/app/components/ImageComment.tsx @@ -1,12 +1,11 @@ -import { Avatar, AvatarFallback } from "@/components/ui/avatar"; +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; -import { Heart, Trash2 } from "lucide-react"; +import { Heart, MessageCircle, Trash2 } from "lucide-react"; import { Link, useFetcher } from "@remix-run/react"; import { useLoggedInUser } from "~/hooks"; import React from "react"; import { toast } from "sonner"; import { cn } from "@/lib/utils"; -import { AvatarImage } from "@radix-ui/react-avatar"; interface CommentUser { id: string; @@ -117,19 +116,25 @@ export const ImageComment = ({ variant="ghost" size="icon" className={cn( - "h-8 w-8 opacity-0 group-hover:opacity-100 transition-opacity", - isLiked && "text-red-500 opacity-100" + "h-8 w-8 group-hover:opacity-100 transition-opacity", + isLiked + ? "text-red-500 opacity-100" + : "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-500 rounded-full" )} onClick={handleLikeClick} disabled={isLoading || !loggedInUser} > - + {isLiked ? ( + + ) : ( + + )} {isCommentOwner && ( + + +

Image Details

+ {imageData.setId && ( +
+

+ + View Set + +

+
+ )} +
+

+ Model:{" "} + {imageData.model} +

+
+ {imageData.stylePreset && ( +
+

+ Style:{" "} + + {imageData.stylePreset} + +

+
+ )} +
+

+ Prompt:{" "} + {imageData.prompt} +

+ {/* */} +
+
+ + + + - -
- {imageData.setId && ( -
-

Set

- - View Set - + {/* Tabs Section - Desktop only */} +
+ + + + + Comments + + + + Info + + + +
+ +
+ {imageData.comments && imageData.comments.length > 0 ? ( + imageData.comments.map((comment) => ( + + )) + ) : ( +

+ No comments yet. +

+ )}
- )} +
-
-

Engine Model

-

{imageData.model}

-
+ +
+ {imageData.setId && ( +
+

Set

+ + View Set + +
+ )} -
-

Style Preset

- {imageData.stylePreset ? ( -

{imageData.stylePreset}

- ) : ( -

none

- )} -
+
+

Engine Model

+

{imageData.model}

+
-
-

Prompt

-
-

{imageData.prompt}

- -
-
-
-
- +
+

Style Preset

+ {imageData.stylePreset ? ( +

+ {imageData.stylePreset} +

+ ) : ( +

none

+ )} +
- {/* Actions Bar - Fixed at bottom */} -
-
-
-
- -
- {/* */} +
+

Prompt

+
+

{imageData.prompt}

+ {/* */} +
+
+
+
+ +
-
-

- {convertUtcDateToLocalDateString(imageData.createdAt!)} + {/* Comments section - Improved mobile scrolling */} +

+
+ {imageData.comments && imageData.comments.length > 0 ? ( + imageData.comments.map((comment) => ( + + )) + ) : ( +

+ No comments yet.

-
- - {/* Comment Input - Now separated with better contrast */} - {isUserLoggedIn && ( - )}
+ + {/* Action buttons - Desktop only */} +
+
+ +

+ {convertUtcDateToLocalDateString(imageData.createdAt!)} +

+
+
+ {/* Comment input section */} +
+ {isUserLoggedIn ? ( + + ) : ( +

+ Log in to comment +

+ )} +
@@ -271,7 +402,7 @@ const ExploreImageDetailsPage = ({ onClose }: ExploreImageDetailsPageProps) => { > e.preventDefault()} >