refactor: remove @numeric-text/react dependency and implement NumericText component

This commit is contained in:
hamster1963
2026-07-05 13:43:41 +08:00
parent 056c357b6e
commit 7424b2bfde
9 changed files with 35 additions and 44 deletions
+1 -11
View File
@@ -1,6 +1,6 @@
import { fireEvent, render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, expect, it, vi } from "vitest";
import { describe, expect, it } from "vitest";
import AnimateCountClient, { AnimateCount } from "@/components/AnimatedCount";
import ErrorBoundary from "@/components/ErrorBoundary";
import ChartSkeleton from "@/components/loading/ChartSkeleton";
@@ -14,16 +14,6 @@ import { Input } from "@/components/ui/input";
import { Separator } from "@/components/ui/separator";
import { Skeleton } from "@/components/ui/skeleton";
vi.mock("@numeric-text/react", () => ({
default: ({
className,
value,
}: {
className?: string;
value: string | number;
}) => <span className={className}>{value}</span>,
}));
import { CommandProvider } from "@/context/command-provider";
import { StatusProvider } from "@/context/status-provider";
import { useCommand } from "@/hooks/use-command";