refactor: remove unused imports and improve variable naming for clarity in statistics and transactions components
This commit is contained in:
@@ -15,7 +15,6 @@ import {
|
|||||||
YearOverYearChart,
|
YearOverYearChart,
|
||||||
} from "@/components/statistics";
|
} from "@/components/statistics";
|
||||||
import { useBankingData } from "@/lib/hooks";
|
import { useBankingData } from "@/lib/hooks";
|
||||||
import { getAccountBalance } from "@/lib/account-utils";
|
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
SelectContent,
|
SelectContent,
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ import {
|
|||||||
normalizeDescription,
|
normalizeDescription,
|
||||||
suggestKeyword,
|
suggestKeyword,
|
||||||
} from "@/components/rules/constants";
|
} from "@/components/rules/constants";
|
||||||
import { format } from "date-fns";
|
|
||||||
import { fr } from "date-fns/locale";
|
|
||||||
|
|
||||||
type SortField = "date" | "amount" | "description";
|
type SortField = "date" | "amount" | "description";
|
||||||
type SortOrder = "asc" | "desc";
|
type SortOrder = "asc" | "desc";
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ export function OFXImportDialog({
|
|||||||
type: parsed.accountType as Account["type"],
|
type: parsed.accountType as Account["type"],
|
||||||
folderId: "folder-root",
|
folderId: "folder-root",
|
||||||
balance: parsed.balance,
|
balance: parsed.balance,
|
||||||
|
initialBalance: parsed.balance,
|
||||||
currency: parsed.currency,
|
currency: parsed.currency,
|
||||||
lastImport: new Date().toISOString(),
|
lastImport: new Date().toISOString(),
|
||||||
externalUrl: null,
|
externalUrl: null,
|
||||||
@@ -297,6 +298,7 @@ export function OFXImportDialog({
|
|||||||
type: parsedData.accountType as Account["type"],
|
type: parsedData.accountType as Account["type"],
|
||||||
folderId: selectedFolder,
|
folderId: selectedFolder,
|
||||||
balance: parsedData.balance,
|
balance: parsedData.balance,
|
||||||
|
initialBalance: parsedData.balance,
|
||||||
currency: parsedData.currency,
|
currency: parsedData.currency,
|
||||||
lastImport: new Date().toISOString(),
|
lastImport: new Date().toISOString(),
|
||||||
externalUrl: null,
|
externalUrl: null,
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import {
|
|||||||
Cell,
|
Cell,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
ResponsiveContainer,
|
ResponsiveContainer,
|
||||||
Legend,
|
|
||||||
} from "recharts";
|
} from "recharts";
|
||||||
import { Layers, List, ChevronDown, ChevronUp } from "lucide-react";
|
import { Layers, List, ChevronDown, ChevronUp } from "lucide-react";
|
||||||
import type { Category } from "@/lib/types";
|
import type { Category } from "@/lib/types";
|
||||||
@@ -38,7 +37,7 @@ interface CategoryPieChartProps {
|
|||||||
export function CategoryPieChart({
|
export function CategoryPieChart({
|
||||||
data,
|
data,
|
||||||
dataByParent,
|
dataByParent,
|
||||||
categories = [],
|
categories: _categories = [],
|
||||||
formatCurrency,
|
formatCurrency,
|
||||||
title = "Répartition par catégorie",
|
title = "Répartition par catégorie",
|
||||||
height = 300,
|
height = 300,
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export function TransactionTable({
|
|||||||
{virtualizer.getVirtualItems().map((virtualRow) => {
|
{virtualizer.getVirtualItems().map((virtualRow) => {
|
||||||
const transaction = transactions[virtualRow.index];
|
const transaction = transactions[virtualRow.index];
|
||||||
const account = getAccount(transaction.accountId);
|
const account = getAccount(transaction.accountId);
|
||||||
const category = getCategory(transaction.categoryId);
|
const _category = getCategory(transaction.categoryId);
|
||||||
const isFocused = focusedIndex === virtualRow.index;
|
const isFocused = focusedIndex === virtualRow.index;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user