♻️ 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:
@@ -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>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user