chore: clean up code by removing trailing whitespace and ensuring consistent formatting across various files = prettier
This commit is contained in:
@@ -115,4 +115,3 @@ export function AccountFolderDialog({
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,4 +13,3 @@ export const accountTypeLabels = {
|
||||
CREDIT_CARD: "Carte de crédit",
|
||||
OTHER: "Autre",
|
||||
};
|
||||
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user