chore: clean up code by removing trailing whitespace and ensuring consistent formatting across various files = prettier
This commit is contained in:
@@ -38,7 +38,9 @@ export function RuleGroupCard({
|
||||
formatCurrency,
|
||||
formatDate,
|
||||
}: RuleGroupCardProps) {
|
||||
const [selectedCategoryId, setSelectedCategoryId] = useState<string | null>(null);
|
||||
const [selectedCategoryId, setSelectedCategoryId] = useState<string | null>(
|
||||
null,
|
||||
);
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
const avgAmount =
|
||||
@@ -59,7 +61,11 @@ export function RuleGroupCard({
|
||||
onClick={onToggleExpand}
|
||||
>
|
||||
<div className="flex items-center gap-2 md:gap-3 flex-1 min-w-0">
|
||||
<Button variant="ghost" size="icon" className="h-5 w-5 md:h-6 md:w-6 shrink-0">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-5 w-5 md:h-6 md:w-6 shrink-0"
|
||||
>
|
||||
{isExpanded ? (
|
||||
<ChevronDown className="h-3 w-3 md:h-4 md:w-4" />
|
||||
) : (
|
||||
@@ -72,7 +78,10 @@ export function RuleGroupCard({
|
||||
<span className="font-medium text-xs md:text-base text-foreground truncate">
|
||||
{group.displayName}
|
||||
</span>
|
||||
<Badge variant="secondary" className="text-[10px] md:text-xs shrink-0">
|
||||
<Badge
|
||||
variant="secondary"
|
||||
className="text-[10px] md:text-xs shrink-0"
|
||||
>
|
||||
{group.transactions.length} 💳
|
||||
</Badge>
|
||||
</div>
|
||||
@@ -91,7 +100,7 @@ export function RuleGroupCard({
|
||||
<div
|
||||
className={cn(
|
||||
"font-semibold tabular-nums text-sm",
|
||||
isDebit ? "text-destructive" : "text-success"
|
||||
isDebit ? "text-destructive" : "text-success",
|
||||
)}
|
||||
>
|
||||
{formatCurrency(group.totalAmount)}
|
||||
@@ -158,10 +167,7 @@ export function RuleGroupCard({
|
||||
{isMobile ? (
|
||||
<div className="max-h-64 overflow-y-auto divide-y divide-border">
|
||||
{group.transactions.map((transaction) => (
|
||||
<div
|
||||
key={transaction.id}
|
||||
className="p-3 hover:bg-muted/50"
|
||||
>
|
||||
<div key={transaction.id} className="p-3 hover:bg-muted/50">
|
||||
<div className="flex items-start justify-between gap-2">
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="text-xs md:text-sm font-medium truncate">
|
||||
@@ -181,7 +187,7 @@ export function RuleGroupCard({
|
||||
"text-xs md:text-sm font-semibold tabular-nums shrink-0",
|
||||
transaction.amount < 0
|
||||
? "text-destructive"
|
||||
: "text-success"
|
||||
: "text-success",
|
||||
)}
|
||||
>
|
||||
{formatCurrency(transaction.amount)}
|
||||
@@ -228,7 +234,7 @@ export function RuleGroupCard({
|
||||
"px-4 py-2 text-right tabular-nums whitespace-nowrap",
|
||||
transaction.amount < 0
|
||||
? "text-destructive"
|
||||
: "text-success"
|
||||
: "text-success",
|
||||
)}
|
||||
>
|
||||
{formatCurrency(transaction.amount)}
|
||||
@@ -244,4 +250,3 @@ export function RuleGroupCard({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user