Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/features/auction/auction-log/ui/auction-log-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function AuctionLogChart({ item }: { item: RecentPriceHistoryType
<ChartTooltip cursor={false} content={<ChartTooltipContent indicator="line" />} />
<Area
dataKey="viewerCount"
type="natural"
type="monotone"
fill="var(--color-brand)"
fillOpacity={0.4}
stroke="var(--color-brand)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function AuctionDetailSellerReviewList({
))}
</div>
<Link href={ROUTES.userReview(sellerId)} className="flex-1">
<Button className="flex-1" variant="outline" size="default">
<Button className="w-full flex-1" variant="outline" size="default">
리뷰 보러가기
</Button>
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@

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";

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);
Expand All @@ -26,7 +29,12 @@ export default function AuctionSellerEmojiButton({
return (
<Popover open={open} onOpenChange={handleOpenChange}>
<PopoverTrigger asChild>
<Button variant="primary" className="flex-1" size="lg">
<Button
variant="primary"
className="flex-1"
size="lg"
disabled={status !== "PROCESS" && status !== "SCHEDULED"}
>
감정 보내기
</Button>
</PopoverTrigger>
Expand Down
8 changes: 7 additions & 1 deletion src/shared/lib/utils/time/format.ts
Original file line number Diff line number Diff line change
@@ -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 "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function AuctionDetailUserActions({
return (
<div className="flex items-center gap-2">
{isSeller ? (
<AuctionSellerEmojiButton auctionId={auctionId} token={token} />
<AuctionSellerEmojiButton auctionId={auctionId} token={token} status={status} />
) : (
<>
<div className="flex items-center gap-1">
Expand Down