diff --git a/app/postlist/PostCard.tsx b/app/postlist/PostCard.tsx index 7161774..fa023bb 100644 --- a/app/postlist/PostCard.tsx +++ b/app/postlist/PostCard.tsx @@ -1,7 +1,9 @@ import React, { useState, useEffect } from "react"; import Link from "next/link"; import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card"; -import { MessageCircle } from "lucide-react"; +// import { MessageCircle } from "lucide-react"; +import { BiSolidMessageRounded } from "react-icons/bi"; + import Image from "next/image"; import { UserAvatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; @@ -88,8 +90,8 @@ const PostCard: React.FC = ({ post, comments, bookmarks, onToggle - - + + {comments[post.id]?.length || 0}
@@ -97,6 +99,7 @@ const PostCard: React.FC = ({ post, comments, bookmarks, onToggle postId={post.id} isBookmarked={bookmarks[post.id] || post.isBookmarked} onToggleBookmark={onToggleBookmark} + />
diff --git a/components/BookmarkButton.tsx b/components/BookmarkButton.tsx index 2251c41..47eec03 100644 --- a/components/BookmarkButton.tsx +++ b/components/BookmarkButton.tsx @@ -1,6 +1,8 @@ import { useState } from 'react'; import { Button } from "@/components/ui/button"; -import { FaBookmark, FaRegBookmark } from 'react-icons/fa'; // Import bookmark icons +import { FaBookmark, FaRegBookmark } from 'react-icons/fa'; + + import { toast } from 'react-toastify'; import { createClient } from "@/utils/supabase/client"; @@ -65,12 +67,12 @@ const BookmarkButton: React.FC = ({ variant='ghost' size="sm" className={`flex items-center justify-center gap-2 transition-colors ${ - bookmarked ? 'text-blue-600 hover:text-blue-700' : 'text-gray-600 hover:text-blue-500' + bookmarked ? 'text-blue-600 hover:text-blue-700' : 'text-gray-300 hover:text-blue-500' }`} onClick={() => handleToggleBookmark(postId)} // Corrected prop name from onToggleBookmark to onClick disabled={loading} > - {bookmarked ? : } + {bookmarked ? : } {loading ? 'Loading...' : bookmarked ? 'Bookmarked' : ''} ); diff --git a/components/CommentsLikeButton.tsx b/components/CommentsLikeButton.tsx index 18732b4..b5b9159 100644 --- a/components/CommentsLikeButton.tsx +++ b/components/CommentsLikeButton.tsx @@ -79,14 +79,14 @@ const CommentsLikeButton = ({ commentId }: CommentsLikeButtonProps) => { return (