diff --git a/src/features/auction/auction-log/ui/auction-log-chart.tsx b/src/features/auction/auction-log/ui/auction-log-chart.tsx index 742c11a2..0c5de6ba 100644 --- a/src/features/auction/auction-log/ui/auction-log-chart.tsx +++ b/src/features/auction/auction-log/ui/auction-log-chart.tsx @@ -30,7 +30,7 @@ export default function AuctionLogChart({ item }: { item: RecentPriceHistoryType } /> - diff --git a/src/features/auction/auction-sale/ui/auction-seller-emoji-button.tsx b/src/features/auction/auction-sale/ui/auction-seller-emoji-button.tsx index d9db8242..a3262880 100644 --- a/src/features/auction/auction-sale/ui/auction-seller-emoji-button.tsx +++ b/src/features/auction/auction-sale/ui/auction-seller-emoji-button.tsx @@ -2,6 +2,7 @@ import { useState } from "react"; +import type { AuctionStatusType } from "@/entities/auction"; import useAuctionSellerSocket from "@/features/auction/auction-sale/hook/use-auction-seller-socket"; import { showToast } from "@/shared/lib/utils/toast/show-toast"; import { Button, Popover, PopoverTrigger, PopoverContent } from "@/shared/ui"; @@ -9,11 +10,13 @@ import { Button, Popover, PopoverTrigger, PopoverContent } from "@/shared/ui"; interface AuctionSellerEmojiButtonProps { token?: string; auctionId: string | number; + status: AuctionStatusType; } export default function AuctionSellerEmojiButton({ auctionId, token, + status, }: AuctionSellerEmojiButtonProps) { const { handleSendEmoji } = useAuctionSellerSocket(auctionId, token); const [open, setOpen] = useState(false); @@ -26,7 +29,12 @@ export default function AuctionSellerEmojiButton({ return ( - diff --git a/src/shared/lib/utils/time/format.ts b/src/shared/lib/utils/time/format.ts index 85035f81..88f6625d 100644 --- a/src/shared/lib/utils/time/format.ts +++ b/src/shared/lib/utils/time/format.ts @@ -1,8 +1,14 @@ import { dayjs } from "@/shared/lib/utils/dayjs"; +export function parseKstLocalDateTime(input: string) { + const normalized = input.replace(/(\.\d{3})\d+$/, "$1"); + return dayjs.tz(normalized, "Asia/Seoul"); +} + export function formatAgo(input: string | Date | number): string { const now = dayjs(); - const t = dayjs(input); + + const t = typeof input === "string" ? parseKstLocalDateTime(input) : dayjs(input); if (!t.isValid()) return ""; diff --git a/src/widgets/auction/auction-detail/ui/auction-detail-user-actions.tsx b/src/widgets/auction/auction-detail/ui/auction-detail-user-actions.tsx index fd0fd3f2..46e2179e 100644 --- a/src/widgets/auction/auction-detail/ui/auction-detail-user-actions.tsx +++ b/src/widgets/auction/auction-detail/ui/auction-detail-user-actions.tsx @@ -38,7 +38,7 @@ export default function AuctionDetailUserActions({ return (
{isSeller ? ( - + ) : ( <>