refactor(dashboard): reorganiza widgets e remove magnet-lines

This commit is contained in:
Felipe Coutinho
2026-03-09 17:12:44 +00:00
parent 3e06a1d056
commit 69da27276c
106 changed files with 6072 additions and 3601 deletions

View File

@@ -0,0 +1,28 @@
"use client";
import { useState } from "react";
import {
DEFAULT_PAYMENT_OVERVIEW_TAB,
type PaymentOverviewTab,
parsePaymentOverviewTab,
} from "@/lib/dashboard/payment-overview-tabs";
export type PaymentOverviewWidgetController = {
activeTab: PaymentOverviewTab;
handleTabChange: (value: string) => void;
};
export function usePaymentOverviewWidgetController(): PaymentOverviewWidgetController {
const [activeTab, setActiveTab] = useState<PaymentOverviewTab>(
DEFAULT_PAYMENT_OVERVIEW_TAB,
);
const handleTabChange = (value: string) => {
setActiveTab(parsePaymentOverviewTab(value));
};
return {
activeTab,
handleTabChange,
};
}