diff --git a/src/app/dashboard/_components/revenue-chart.tsx b/src/app/dashboard/_components/revenue-chart.tsx
index f970d3b..1497ebc 100644
--- a/src/app/dashboard/_components/revenue-chart.tsx
+++ b/src/app/dashboard/_components/revenue-chart.tsx
@@ -10,13 +10,7 @@ import {
} from "recharts";
import { useAnimationPreferences } from "~/components/providers/animation-preferences-provider";
-interface Invoice {
- id: string;
- totalAmount: number;
- issueDate: Date | string;
- status: string;
- dueDate: Date | string;
-}
+
interface RevenueChartProps {
data: {
@@ -26,6 +20,41 @@ interface RevenueChartProps {
}[];
}
+const CustomTooltip = ({
+ active,
+ payload,
+ label,
+}: {
+ active?: boolean;
+ payload?: Array<{ payload: { revenue: number } }>;
+ label?: string;
+}) => {
+ const formatCurrency = (value: number) => {
+ return new Intl.NumberFormat("en-US", {
+ style: "currency",
+ currency: "USD",
+ minimumFractionDigits: 0,
+ maximumFractionDigits: 0,
+ }).format(value);
+ };
+
+ if (active && payload?.length) {
+ const data = payload[0]!.payload;
+ return (
+
+
{label}
+
+ Revenue: {formatCurrency(data.revenue)}
+
+
+ {/* Count not available in aggregated view currently */}
+
+
+ );
+ }
+ return null;
+};
+
export function RevenueChart({ data }: RevenueChartProps) {
// Use data directly
const chartData = data;
@@ -39,32 +68,6 @@ export function RevenueChart({ data }: RevenueChartProps) {
}).format(value);
};
- const CustomTooltip = ({
- active,
- payload,
- label,
- }: {
- active?: boolean;
- payload?: Array<{ payload: { revenue: number } }>;
- label?: string;
- }) => {
- if (active && payload?.length) {
- const data = payload[0]!.payload;
- return (
-
-
{label}
-
- Revenue: {formatCurrency(data.revenue)}
-
-
- {/* Count not available in aggregated view currently */}
-
-
- );
- }
- return null;
- };
-
const { prefersReducedMotion, animationSpeedMultiplier } =
useAnimationPreferences();
if (chartData.length === 0) {
diff --git a/src/app/dashboard/clients/page.tsx b/src/app/dashboard/clients/page.tsx
index 7891db9..f62c2c8 100644
--- a/src/app/dashboard/clients/page.tsx
+++ b/src/app/dashboard/clients/page.tsx
@@ -4,7 +4,6 @@ import { PageHeader } from "~/components/layout/page-header";
import { Button } from "~/components/ui/button";
import { HydrateClient } from "~/trpc/server";
import { ClientsTable } from "./_components/clients-table";
-import { Card, CardContent } from "~/components/ui/card";
export default async function ClientsPage() {
return (
diff --git a/src/app/dashboard/invoices/page.tsx b/src/app/dashboard/invoices/page.tsx
index e5e27e2..661c4a2 100644
--- a/src/app/dashboard/invoices/page.tsx
+++ b/src/app/dashboard/invoices/page.tsx
@@ -6,7 +6,6 @@ import { PageHeader } from "~/components/layout/page-header";
import { Plus, Upload } from "lucide-react";
import { InvoicesDataTable } from "./_components/invoices-data-table";
import { DataTableSkeleton } from "~/components/data/data-table";
-import { Card, CardContent } from "~/components/ui/card";
// Invoices Table Component
async function InvoicesTable() {
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 6b3ae69..4b09acb 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -11,7 +11,6 @@ import {
Shield,
BarChart3,
Rocket,
- ChevronRight,
} from "lucide-react";
export default function HomePage() {
diff --git a/src/components/forms/invoice-form.tsx b/src/components/forms/invoice-form.tsx
index 9a23b58..ba00bd7 100644
--- a/src/components/forms/invoice-form.tsx
+++ b/src/components/forms/invoice-form.tsx
@@ -1,7 +1,7 @@
"use client";
import * as React from "react";
-import { useState, useEffect, useRef } from "react";
+import { useState, useEffect } from "react";
import { useRouter } from "next/navigation";
import { Button } from "~/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "~/components/ui/card";
diff --git a/src/components/forms/invoice/invoice-workspace.tsx b/src/components/forms/invoice/invoice-workspace.tsx
index 1f9d452..87da73e 100644
--- a/src/components/forms/invoice/invoice-workspace.tsx
+++ b/src/components/forms/invoice/invoice-workspace.tsx
@@ -3,9 +3,7 @@
import * as React from "react";
import { cn } from "~/lib/utils";
import { Button } from "~/components/ui/button";
-import { Card, CardContent } from "~/components/ui/card";
-import { ScrollArea } from "~/components/ui/scroll-area";
-import { List, Calendar as CalendarIcon, Plus } from "lucide-react";
+import { List, Calendar as CalendarIcon } from "lucide-react";
import { InvoiceLineItems } from "../invoice-line-items";
import { InvoiceCalendarView } from "../invoice-calendar-view";
import type { InvoiceFormData } from "./types";
@@ -19,7 +17,7 @@ interface InvoiceWorkspaceProps {
updateItem: (index: number, field: string, value: string | number | Date) => void;
moveItemUp: (index: number) => void;
moveItemDown: (index: number) => void;
- reorderItems: (items: any[]) => void;
+ reorderItems: (items: InvoiceFormData['items']) => void;
className?: string;
}
diff --git a/src/components/layout/sidebar-provider.tsx b/src/components/layout/sidebar-provider.tsx
index 4e134b7..5356d93 100644
--- a/src/components/layout/sidebar-provider.tsx
+++ b/src/components/layout/sidebar-provider.tsx
@@ -20,7 +20,7 @@ export function SidebarProvider({ children }: { children: React.ReactNode }) {
React.useEffect(() => {
const saved = localStorage.getItem("sidebar-collapsed");
if (saved) {
- setIsCollapsed(JSON.parse(saved));
+ setIsCollapsed(JSON.parse(saved) as boolean);
}
}, []);
diff --git a/src/components/providers/animation-preferences-provider.tsx b/src/components/providers/animation-preferences-provider.tsx
index d820687..0e7fc6c 100644
--- a/src/components/providers/animation-preferences-provider.tsx
+++ b/src/components/providers/animation-preferences-provider.tsx
@@ -403,9 +403,9 @@ export function useAnimationPreferences(): AnimationPreferencesContextValue {
return {
prefersReducedMotion: false,
animationSpeedMultiplier: 1,
- updatePreferences: () => { },
- setPrefersReducedMotion: () => { },
- setAnimationSpeedMultiplier: () => { },
+ updatePreferences: () => { /* no-op fallback */ },
+ setPrefersReducedMotion: () => { /* no-op fallback */ },
+ setAnimationSpeedMultiplier: () => { /* no-op fallback */ },
isUpdating: false,
lastSyncedAt: null,
};
diff --git a/src/server/umami.ts b/src/server/umami.ts
index 77ae54d..7393d66 100644
--- a/src/server/umami.ts
+++ b/src/server/umami.ts
@@ -10,14 +10,14 @@ type UmamiPayload = {
url: string;
website: string;
name: string;
- data?: Record;
+ data?: Record;
};
type: "event";
};
export async function trackServerEvent(
eventName: string,
- eventData?: Record,
+ eventData?: Record,
) {
if (!env.NEXT_PUBLIC_UMAMI_WEBSITE_ID || !env.NEXT_PUBLIC_UMAMI_SCRIPT_URL) {
console.warn("Umami not configured, skipping server-side event tracking");