♻️ refactor: restructure ModelPricing component into modular architecture

- Break down monolithic ModelPricing.js (685 lines) into focused components:
  * ModelPricingHeader.jsx - top status card with pricing information
  * ModelPricingTabs.jsx - model category navigation tabs
  * ModelPricingFilters.jsx - search and action controls
  * ModelPricingTable.jsx - data table with pricing details
  * ModelPricingColumnDefs.js - table column definitions and renderers

- Create custom hook useModelPricingData.js for centralized state management:
  * Consolidate all business logic and API calls
  * Manage pricing calculations and data transformations
  * Handle search, filtering, and UI interactions

- Follow project conventions matching other table components:
  * Adopt same file structure as channels/, users/, tokens/ modules
  * Maintain consistent naming patterns and component organization
  * Preserve all original functionality including responsive design

- Update import paths:
  * Remove obsolete ModelPricing.js file
  * Update Pricing page to use new ModelPricingPage component
  * Fix missing import references

Benefits:
- Improved maintainability with single-responsibility components
- Enhanced code reusability and testability
- Better team collaboration with modular structure
- Consistent codebase architecture across all table components
This commit is contained in:
t0ng7u
2025-07-22 12:08:35 +08:00
parent e224ee5498
commit 0c5c5823bf
9 changed files with 984 additions and 686 deletions

View File

@@ -18,11 +18,11 @@ For commercial licensing, please contact support@quantumnous.com
*/
import React from 'react';
import ModelPricing from '../../components/table/ModelPricing.js';
import ModelPricingPage from '../../components/table/model-pricing';
const Pricing = () => (
<div className="mt-[60px] px-2">
<ModelPricing />
<ModelPricingPage />
</div>
);