chore: clean up code by removing trailing whitespace and ensuring consistent formatting across various files = prettier

This commit is contained in:
Julien Froidefond
2025-12-01 08:37:30 +01:00
parent 757b1b84ab
commit e715779de7
98 changed files with 5453 additions and 3126 deletions

View File

@@ -115,4 +115,3 @@ export function AccountFolderDialog({
</Dialog>
);
}

View File

@@ -13,4 +13,3 @@ export const accountTypeLabels = {
CREDIT_CARD: "Carte de crédit",
OTHER: "Autre",
};

View File

@@ -48,7 +48,7 @@ export function DraggableAccountItem({
style={style}
className={cn(
"flex items-center gap-2 p-2 rounded-lg hover:bg-muted/50 group ml-12",
isDragging && "bg-muted/80"
isDragging && "bg-muted/80",
)}
>
<button
@@ -66,14 +66,15 @@ export function DraggableAccountItem({
{account.name}
{account.accountNumber && (
<span className="text-muted-foreground">
{" "}({account.accountNumber})
{" "}
({account.accountNumber})
</span>
)}
</Link>
<span
className={cn(
"text-sm tabular-nums",
realBalance >= 0 ? "text-emerald-600" : "text-red-600"
realBalance >= 0 ? "text-emerald-600" : "text-red-600",
)}
>
{formatCurrency(realBalance)}
@@ -89,4 +90,3 @@ export function DraggableAccountItem({
</div>
);
}

View File

@@ -77,7 +77,7 @@ export function DraggableFolderItem({
className={cn(
"flex items-center gap-2 p-2 rounded-lg hover:bg-muted/50 group",
level > 0 && "ml-6",
isDragging && "bg-muted/80"
isDragging && "bg-muted/80",
)}
>
<button
@@ -120,7 +120,7 @@ export function DraggableFolderItem({
<span
className={cn(
"text-sm font-semibold tabular-nums",
folderTotal >= 0 ? "text-emerald-600" : "text-red-600"
folderTotal >= 0 ? "text-emerald-600" : "text-red-600",
)}
>
{formatCurrency(folderTotal)}
@@ -157,4 +157,3 @@ export function DraggableFolderItem({
</div>
);
}

View File

@@ -96,11 +96,13 @@ export function FolderEditDialog({
{folderColors.map(({ value }) => (
<button
key={value}
onClick={() => onFormDataChange({ ...formData, color: value })}
onClick={() =>
onFormDataChange({ ...formData, color: value })
}
className={cn(
"w-8 h-8 rounded-full transition-transform",
formData.color === value &&
"ring-2 ring-offset-2 ring-primary scale-110"
"ring-2 ring-offset-2 ring-primary scale-110",
)}
style={{ backgroundColor: value }}
/>
@@ -120,4 +122,3 @@ export function FolderEditDialog({
</Dialog>
);
}

View File

@@ -33,7 +33,7 @@ export function FolderTreeItem({
const folderAccounts = accounts.filter(
(a) =>
a.folderId === folder.id ||
(folder.id === "folder-root" && a.folderId === null)
(folder.id === "folder-root" && a.folderId === null),
);
const childFolders = allFolders.filter((f) => f.parentId === folder.id);
const folderTotal = folderAccounts.reduce(
@@ -88,4 +88,3 @@ export function FolderTreeItem({
</div>
);
}

View File

@@ -4,4 +4,3 @@ export { AccountFolderDialog } from "./account-folder-dialog";
export { DraggableFolderItem } from "./draggable-folder-item";
export { DraggableAccountItem } from "./draggable-account-item";
export { folderColors, accountTypeLabels } from "./constants";