chore: clean up code by removing trailing whitespace and ensuring consistent formatting across various files = prettier
This commit is contained in:
@@ -23,7 +23,7 @@ export function AccountsSummary({ data }: AccountsSummaryProps) {
|
||||
// Group accounts by folder
|
||||
const accountsByFolder = useMemo(() => {
|
||||
const grouped: Record<string, Account[]> = {};
|
||||
|
||||
|
||||
data.accounts.forEach((account) => {
|
||||
const folderId = account.folderId || "no-folder";
|
||||
if (!grouped[folderId]) {
|
||||
@@ -72,7 +72,12 @@ export function AccountsSummary({ data }: AccountsSummaryProps) {
|
||||
{/* Folder header */}
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<FolderIcon className="w-4 h-4 text-muted-foreground" />
|
||||
<h3 className={cn("font-semibold text-sm", level > 0 && "text-muted-foreground")}>
|
||||
<h3
|
||||
className={cn(
|
||||
"font-semibold text-sm",
|
||||
level > 0 && "text-muted-foreground",
|
||||
)}
|
||||
>
|
||||
{folder.name}
|
||||
</h3>
|
||||
{folderAccounts.length > 0 && (
|
||||
@@ -122,9 +127,7 @@ export function AccountsSummary({ data }: AccountsSummaryProps) {
|
||||
<span
|
||||
className={cn(
|
||||
"font-semibold tabular-nums",
|
||||
realBalance >= 0
|
||||
? "text-emerald-600"
|
||||
: "text-red-600",
|
||||
realBalance >= 0 ? "text-emerald-600" : "text-red-600",
|
||||
)}
|
||||
>
|
||||
{formatCurrency(realBalance)}
|
||||
@@ -218,7 +221,9 @@ export function AccountsSummary({ data }: AccountsSummaryProps) {
|
||||
<Building2 className="w-4 h-4 text-primary" />
|
||||
</div>
|
||||
<div>
|
||||
<p className="font-medium text-sm">{account.name}</p>
|
||||
<p className="font-medium text-sm">
|
||||
{account.name}
|
||||
</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{account.accountNumber}
|
||||
</p>
|
||||
|
||||
@@ -17,7 +17,7 @@ export function CategoryBreakdown({ data }: CategoryBreakdownProps) {
|
||||
const thisMonthStr = thisMonth.toISOString().slice(0, 7);
|
||||
|
||||
const monthExpenses = data.transactions.filter(
|
||||
(t) => t.date.startsWith(thisMonthStr) && t.amount < 0
|
||||
(t) => t.date.startsWith(thisMonthStr) && t.amount < 0,
|
||||
);
|
||||
|
||||
const categoryTotals = new Map<string, number>();
|
||||
|
||||
@@ -116,7 +116,9 @@ export function OverviewCards({ data }: OverviewCardsProps) {
|
||||
<CreditCard className="h-3 w-3 md:h-4 md:w-4 text-muted-foreground" />
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="text-xl md:text-2xl font-bold">{reconciledPercent}%</div>
|
||||
<div className="text-xl md:text-2xl font-bold">
|
||||
{reconciledPercent}%
|
||||
</div>
|
||||
<p className="text-[10px] md:text-xs text-muted-foreground mt-1">
|
||||
{reconciled} / {total} opérations pointées
|
||||
</p>
|
||||
|
||||
@@ -60,7 +60,9 @@ export function RecentTransactions({ data }: RecentTransactionsProps) {
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle className="text-sm md:text-base">Transactions récentes</CardTitle>
|
||||
<CardTitle className="text-sm md:text-base">
|
||||
Transactions récentes
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="px-3 md:px-6">
|
||||
<div className="space-y-3">
|
||||
|
||||
@@ -36,7 +36,11 @@ interface SidebarContentProps {
|
||||
onNavigate?: () => void;
|
||||
}
|
||||
|
||||
function SidebarContent({ collapsed = false, onNavigate, showHeader = false }: SidebarContentProps & { showHeader?: boolean }) {
|
||||
function SidebarContent({
|
||||
collapsed = false,
|
||||
onNavigate,
|
||||
showHeader = false,
|
||||
}: SidebarContentProps & { showHeader?: boolean }) {
|
||||
const pathname = usePathname();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -134,7 +138,10 @@ export function Sidebar({ open, onOpenChange }: SidebarProps) {
|
||||
<Sheet open={open} onOpenChange={onOpenChange}>
|
||||
<SheetContent side="left" className="w-64 p-0">
|
||||
<div className="flex flex-col h-full">
|
||||
<SidebarContent showHeader onNavigate={() => onOpenChange?.(false)} />
|
||||
<SidebarContent
|
||||
showHeader
|
||||
onNavigate={() => onOpenChange?.(false)}
|
||||
/>
|
||||
</div>
|
||||
</SheetContent>
|
||||
</Sheet>
|
||||
|
||||
Reference in New Issue
Block a user