style: clean up code formatting and remove trailing whitespace

refactor: reorganize imports and fix type imports
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-11 03:08:36 -03:00
1 parent d3704602fd
commit 47c04de6fe
232 files changed
+7140 -4798

No files matched your search

+7 -19
View File
@@ -1,24 +1,13 @@
"use client";
import { MarketOffer } from "@/types/item";
import { Clock, Coins, Heart, Shield, Sword } from "lucide-react";
import { useTranslations } from "next-intl";
import { useState } from "react";
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { PriceDisplay } from "@/components/ui/price-display";
import { useTranslations } from "next-intl";
import {
Clock,
User,
Coins,
TrendingUp,
TrendingDown,
Star,
Heart,
Shield,
Sword,
} from "lucide-react";
import { useState } from "react";
import { getRarityColor, getRarityBgColor } from "@/lib/currency-utils";
import type { MarketOffer } from "@/types/item";
interface OfferCardProps {
offer: MarketOffer;
@@ -28,7 +17,7 @@ export function OfferCard({ offer }: OfferCardProps) {
const t = useTranslations("home.stats");
const tButtons = useTranslations("home.buttons");
const [isFavorited, setIsFavorited] = useState(false);
const [isHovered, setIsHovered] = useState(false);
const [_isHovered, setIsHovered] = useState(false);
const formatTimeAgo = (timestamp: Date) => {
const now = new Date();
@@ -81,8 +70,7 @@ export function OfferCard({ offer }: OfferCardProps) {
};
const isHotDeal = offer.price < offer.item.priceHistory.average * 0.8;
const isNewOffer =
new Date().getTime() - offer.timestamp.getTime() < 1000 * 60 * 30; // 30 min
const isNewOffer = Date.now() - offer.timestamp.getTime() < 1000 * 60 * 30; // 30 min
return (
<div
@@ -128,7 +116,7 @@ export function OfferCard({ offer }: OfferCardProps) {
</div>
<Badge
className={`${getRarityColor(
offer.item.rarity
offer.item.rarity,
)} text-white absolute -top-2 -right-2 text-xs shadow-lg`}
>
{offer.item.rarity}