diff --git a/client/src/components/post/PostCard.tsx b/client/src/components/post/PostCard.tsx index d419b21..5f6fb72 100644 --- a/client/src/components/post/PostCard.tsx +++ b/client/src/components/post/PostCard.tsx @@ -26,13 +26,12 @@ import "../newpost/quill.mention.css"; import { sanitize } from "isomorphic-dompurify"; import UserAvatar from "../user/info/UserAvatar"; import Link from "next/link"; -import HOME, { USER_PAGE } from "@/const/clientPath"; +import { USER_PAGE } from "@/const/clientPath"; import { useMyInfoQuery } from "@/queries/auth/useMyInfoQuery"; import PostCardOptionDropdown from "./PostCardOptionDropdown"; import { postcardContext } from "@/store/post/PostCardContext"; -import { useDeletePostMutation } from "@/queries/post/useDeletePostMutation"; -import useDeleteAttachMutation from "@/queries/attach/useDeleteAttachMutation"; import { useRouter } from "next/navigation"; +import formatTime from "@/utils/formatTime"; const PostCard = ({ postAttachUrls, @@ -52,7 +51,6 @@ const PostCard = ({ alcoholNo, }: PostInterface) => { const openPostDetailPage = useOpenPostDetailPage(); - const router = useRouter(); const hasImage = useMemo(() => postAttachUrls.length !== 0, [postAttachUrls]); @@ -61,9 +59,6 @@ const PostCard = ({ const { mutate: likeHandler } = useLikePostMutation(searchContext); const { mutate: unLikeHandler } = useUnLikePostMutation(searchContext); - const { mutateAsync: deletePost } = useDeletePostMutation(); - const { mutateAsync: deleteFile } = useDeleteAttachMutation(); - const { data: currentUser } = useMyInfoQuery(); const isMyPost = useMemo( @@ -106,7 +101,7 @@ const PostCard = ({ >{`@${id}`} - {dayjs(lastModifiedDate).format("MM.DD")} + {formatTime(lastModifiedDate)} @@ -149,7 +144,7 @@ const PostCard = ({ borderRadius: 2, bgcolor: "background.default", cursor: "pointer", - aspectRatio: 2.36 + aspectRatio: 2.36, }} /> )}