refactor(usage-logs): 移除重置按钮和相关逻辑
This commit is contained in:
1 parent
954e1b539f
commit
9b52d43835
1 file changed
+1
-13
@@ -11,7 +11,7 @@ import { Input } from "@/components/ui/input";
|
|||||||
import { Select } from "@/components/ui/select";
|
import { Select } from "@/components/ui/select";
|
||||||
import { readScopedCache, writeScopedCache } from "@/lib/local-cache";
|
import { readScopedCache, writeScopedCache } from "@/lib/local-cache";
|
||||||
import { cn, formatCurrency, parseUtcTimestamp } from "@/lib/utils";
|
import { cn, formatCurrency, parseUtcTimestamp } from "@/lib/utils";
|
||||||
import { Eye, RefreshCw, RotateCcw, Search } from "lucide-react";
|
import { Eye, RefreshCw, Search } from "lucide-react";
|
||||||
|
|
||||||
type UsageLogFilterState = {
|
type UsageLogFilterState = {
|
||||||
range: AnalyticsRange;
|
range: AnalyticsRange;
|
||||||
@@ -251,15 +251,6 @@ export function UsageLogs() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleReset = () => {
|
|
||||||
const preset = createFilterPreset("24h");
|
|
||||||
setDraftFilters(preset);
|
|
||||||
startTransition(() => {
|
|
||||||
setCurrentPage(1);
|
|
||||||
setAppliedFilters(preset);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const handlePageChange = (page: number) => {
|
const handlePageChange = (page: number) => {
|
||||||
if (page < 1 || page === activePage || (totalPages > 0 && page > totalPages)) {
|
if (page < 1 || page === activePage || (totalPages > 0 && page > totalPages)) {
|
||||||
return;
|
return;
|
||||||
@@ -382,9 +373,6 @@ export function UsageLogs() {
|
|||||||
<Search className="h-4 w-4" />
|
<Search className="h-4 w-4" />
|
||||||
查询
|
查询
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline" onClick={handleReset}>
|
|
||||||
<RotateCcw className="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|||||||
Reference in new issue
Block a user