refactor: standardize quotation marks in pnpm-lock.yaml and improve code formatting across various components; enhance readability and maintain consistency in code style
This commit is contained in:
@@ -130,9 +130,7 @@ export function AccountsSummary({ data }: AccountsSummaryProps) {
|
||||
<span
|
||||
className={cn(
|
||||
"font-bold tabular-nums text-base",
|
||||
realBalance >= 0
|
||||
? "text-success"
|
||||
: "text-destructive",
|
||||
realBalance >= 0 ? "text-success" : "text-destructive",
|
||||
)}
|
||||
>
|
||||
{formatCurrency(realBalance)}
|
||||
|
||||
@@ -19,7 +19,7 @@ interface OverviewCardsProps {
|
||||
export function OverviewCards({ data }: OverviewCardsProps) {
|
||||
const totalBalance = data.accounts.reduce(
|
||||
(sum, acc) => sum + getAccountBalance(acc),
|
||||
0
|
||||
0,
|
||||
);
|
||||
|
||||
const thisMonth = new Date();
|
||||
@@ -27,7 +27,7 @@ export function OverviewCards({ data }: OverviewCardsProps) {
|
||||
const thisMonthStr = thisMonth.toISOString().slice(0, 7);
|
||||
|
||||
const monthTransactions = data.transactions.filter((t) =>
|
||||
t.date.startsWith(thisMonthStr)
|
||||
t.date.startsWith(thisMonthStr),
|
||||
);
|
||||
|
||||
const income = monthTransactions
|
||||
@@ -44,7 +44,7 @@ export function OverviewCards({ data }: OverviewCardsProps) {
|
||||
total > 0 ? ((reconciled / total) * 100).toFixed(2) : "0.00";
|
||||
|
||||
const categorized = data.transactions.filter(
|
||||
(t) => t.categoryId !== null
|
||||
(t) => t.categoryId !== null,
|
||||
).length;
|
||||
const categorizedPercent =
|
||||
total > 0 ? ((categorized / total) * 100).toFixed(2) : "0.00";
|
||||
@@ -61,7 +61,10 @@ export function OverviewCards({ data }: OverviewCardsProps) {
|
||||
<Card className="stat-card-gradient-1 card-hover group relative overflow-hidden">
|
||||
{/* Icône en arrière-plan */}
|
||||
<div className="absolute bottom-2 right-2 opacity-[0.04] z-0 pointer-events-none">
|
||||
<Wallet className="h-20 w-20 sm:h-24 sm:w-24 md:h-28 md:w-28 text-primary" strokeWidth={1} />
|
||||
<Wallet
|
||||
className="h-20 w-20 sm:h-24 sm:w-24 md:h-28 md:w-28 text-primary"
|
||||
strokeWidth={1}
|
||||
/>
|
||||
</div>
|
||||
<CardHeader className="flex flex-row items-start justify-between space-y-0 pb-3 px-5 pt-5 sm:px-6 sm:pt-6 relative z-10">
|
||||
<CardTitle className="text-[10px] sm:text-xs font-semibold text-muted-foreground/80 leading-tight uppercase tracking-wider flex-1 min-w-0">
|
||||
@@ -72,9 +75,7 @@ export function OverviewCards({ data }: OverviewCardsProps) {
|
||||
<div
|
||||
className={cn(
|
||||
"text-2xl sm:text-3xl md:text-3xl lg:text-2xl xl:text-3xl font-black tracking-tight mb-3 leading-tight break-words",
|
||||
totalBalance >= 0
|
||||
? "text-success"
|
||||
: "text-destructive"
|
||||
totalBalance >= 0 ? "text-success" : "text-destructive",
|
||||
)}
|
||||
>
|
||||
{formatCurrency(totalBalance)}
|
||||
@@ -88,7 +89,10 @@ export function OverviewCards({ data }: OverviewCardsProps) {
|
||||
<Card className="stat-card-gradient-2 card-hover group relative overflow-hidden">
|
||||
{/* Icône en arrière-plan */}
|
||||
<div className="absolute bottom-2 right-2 opacity-[0.04] z-0 pointer-events-none">
|
||||
<TrendingUp className="h-20 w-20 sm:h-24 sm:w-24 md:h-28 md:w-28 text-success" strokeWidth={1} />
|
||||
<TrendingUp
|
||||
className="h-20 w-20 sm:h-24 sm:w-24 md:h-28 md:w-28 text-success"
|
||||
strokeWidth={1}
|
||||
/>
|
||||
</div>
|
||||
<CardHeader className="flex flex-row items-start justify-between space-y-0 pb-3 px-5 pt-5 sm:px-6 sm:pt-6 relative z-10">
|
||||
<CardTitle className="text-[10px] sm:text-xs font-semibold text-muted-foreground/80 leading-tight uppercase tracking-wider flex-1 min-w-0">
|
||||
@@ -111,7 +115,10 @@ export function OverviewCards({ data }: OverviewCardsProps) {
|
||||
<Card className="stat-card-gradient-3 card-hover group relative overflow-hidden">
|
||||
{/* Icône en arrière-plan */}
|
||||
<div className="absolute bottom-2 right-2 opacity-[0.04] z-0 pointer-events-none">
|
||||
<TrendingDown className="h-20 w-20 sm:h-24 sm:w-24 md:h-28 md:w-28 text-destructive" strokeWidth={1} />
|
||||
<TrendingDown
|
||||
className="h-20 w-20 sm:h-24 sm:w-24 md:h-28 md:w-28 text-destructive"
|
||||
strokeWidth={1}
|
||||
/>
|
||||
</div>
|
||||
<CardHeader className="flex flex-row items-start justify-between space-y-0 pb-3 px-5 pt-5 sm:px-6 sm:pt-6 relative z-10">
|
||||
<CardTitle className="text-[10px] sm:text-xs font-semibold text-muted-foreground/80 leading-tight uppercase tracking-wider flex-1 min-w-0">
|
||||
@@ -134,7 +141,10 @@ export function OverviewCards({ data }: OverviewCardsProps) {
|
||||
<Card className="stat-card-gradient-4 card-hover group relative overflow-hidden">
|
||||
{/* Icône en arrière-plan */}
|
||||
<div className="absolute bottom-2 right-2 opacity-[0.04] z-0 pointer-events-none">
|
||||
<CreditCard className="h-20 w-20 sm:h-24 sm:w-24 md:h-28 md:w-28 text-chart-4" strokeWidth={1} />
|
||||
<CreditCard
|
||||
className="h-20 w-20 sm:h-24 sm:w-24 md:h-28 md:w-28 text-chart-4"
|
||||
strokeWidth={1}
|
||||
/>
|
||||
</div>
|
||||
<CardHeader className="flex flex-row items-start justify-between space-y-0 pb-3 px-5 pt-5 sm:px-6 sm:pt-6 relative z-10">
|
||||
<CardTitle className="text-[10px] sm:text-xs font-semibold text-muted-foreground/80 leading-tight uppercase tracking-wider flex-1 min-w-0">
|
||||
@@ -154,7 +164,10 @@ export function OverviewCards({ data }: OverviewCardsProps) {
|
||||
<Card className="stat-card-gradient-5 card-hover group relative overflow-hidden">
|
||||
{/* Icône en arrière-plan */}
|
||||
<div className="absolute bottom-2 right-2 opacity-[0.04] z-0 pointer-events-none">
|
||||
<Tag className="h-20 w-20 sm:h-24 sm:w-24 md:h-28 md:w-28 text-chart-5" strokeWidth={1} />
|
||||
<Tag
|
||||
className="h-20 w-20 sm:h-24 sm:w-24 md:h-28 md:w-28 text-chart-5"
|
||||
strokeWidth={1}
|
||||
/>
|
||||
</div>
|
||||
<CardHeader className="flex flex-row items-start justify-between space-y-0 pb-3 px-5 pt-5 sm:px-6 sm:pt-6 relative z-10">
|
||||
<CardTitle className="text-[10px] sm:text-xs font-semibold text-muted-foreground/80 leading-tight uppercase tracking-wider flex-1 min-w-0">
|
||||
|
||||
@@ -89,7 +89,7 @@ export function RecentTransactions({ data }: RecentTransactionsProps) {
|
||||
"font-black tabular-nums text-sm md:text-base shrink-0 md:hidden",
|
||||
transaction.amount >= 0
|
||||
? "text-success"
|
||||
: "text-destructive"
|
||||
: "text-destructive",
|
||||
)}
|
||||
>
|
||||
{transaction.amount >= 0 ? "+" : ""}
|
||||
@@ -131,7 +131,7 @@ export function RecentTransactions({ data }: RecentTransactionsProps) {
|
||||
"font-black tabular-nums text-base md:text-lg shrink-0 hidden md:block leading-tight",
|
||||
transaction.amount >= 0
|
||||
? "text-success"
|
||||
: "text-destructive"
|
||||
: "text-destructive",
|
||||
)}
|
||||
>
|
||||
{transaction.amount >= 0 ? "+" : ""}
|
||||
|
||||
@@ -93,7 +93,7 @@ function SidebarContent({
|
||||
"w-full justify-start gap-3 h-12 rounded-2xl px-3",
|
||||
isActive &&
|
||||
"bg-gradient-to-r from-primary/15 via-primary/10 to-primary/5 border-2 border-primary/30 shadow-lg shadow-primary/10 backdrop-blur-sm",
|
||||
collapsed && "justify-center px-2 w-12 mx-auto"
|
||||
collapsed && "justify-center px-2 w-12 mx-auto",
|
||||
)}
|
||||
>
|
||||
<item.icon
|
||||
@@ -103,7 +103,7 @@ function SidebarContent({
|
||||
<span
|
||||
className={cn(
|
||||
"font-semibold text-sm",
|
||||
isActive && "text-primary font-bold"
|
||||
isActive && "text-primary font-bold",
|
||||
)}
|
||||
>
|
||||
{item.label}
|
||||
@@ -118,7 +118,7 @@ function SidebarContent({
|
||||
<div
|
||||
className={cn(
|
||||
"border-t border-border/30 pt-2",
|
||||
collapsed ? "p-2" : "p-4"
|
||||
collapsed ? "p-2" : "p-4",
|
||||
)}
|
||||
>
|
||||
<Link href="/settings" onClick={handleLinkClick} className="block mb-2">
|
||||
@@ -126,7 +126,7 @@ function SidebarContent({
|
||||
variant="ghost"
|
||||
className={cn(
|
||||
"w-full justify-start gap-3 h-12 rounded-2xl px-3",
|
||||
collapsed && "justify-center px-2 w-12 mx-auto"
|
||||
collapsed && "justify-center px-2 w-12 mx-auto",
|
||||
)}
|
||||
>
|
||||
<Settings className="w-5 h-5 shrink-0" />
|
||||
@@ -141,7 +141,7 @@ function SidebarContent({
|
||||
className={cn(
|
||||
"w-full justify-start gap-3 h-12 rounded-2xl px-3 mb-2",
|
||||
"text-destructive",
|
||||
collapsed && "justify-center px-2 w-12 mx-auto"
|
||||
collapsed && "justify-center px-2 w-12 mx-auto",
|
||||
)}
|
||||
>
|
||||
<LogOut className="w-5 h-5 shrink-0" />
|
||||
@@ -187,13 +187,13 @@ export function Sidebar({ open, onOpenChange }: SidebarProps) {
|
||||
className={cn(
|
||||
"hidden md:flex flex-col h-screen bg-sidebar text-sidebar-foreground border-r border-sidebar-border",
|
||||
"backdrop-blur-xl",
|
||||
collapsed ? "w-16" : "w-64"
|
||||
collapsed ? "w-16" : "w-64",
|
||||
)}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
"flex items-center border-b border-border/30",
|
||||
collapsed ? "justify-center p-4" : "justify-between p-6"
|
||||
collapsed ? "justify-center p-4" : "justify-between p-6",
|
||||
)}
|
||||
>
|
||||
{!collapsed && (
|
||||
|
||||
Reference in New Issue
Block a user