2025-07-24 17:10:08 +08:00
|
|
|
/*
|
|
|
|
|
Copyright (C) 2025 QuantumNous
|
|
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU Affero General Public License as
|
|
|
|
|
published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
For commercial licensing, please contact support@quantumnous.com
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import React from 'react';
|
2025-08-04 21:36:31 +08:00
|
|
|
import PricingVendorIntro from './PricingVendorIntro';
|
|
|
|
|
import PricingVendorIntroSkeleton from './PricingVendorIntroSkeleton';
|
2025-07-24 17:10:08 +08:00
|
|
|
import { useMinimumLoadingTime } from '../../../../../hooks/common/useMinimumLoadingTime';
|
|
|
|
|
|
2025-08-04 21:36:31 +08:00
|
|
|
const PricingVendorIntroWithSkeleton = ({
|
2025-07-24 17:10:08 +08:00
|
|
|
loading = false,
|
2025-08-04 21:36:31 +08:00
|
|
|
filterVendor,
|
|
|
|
|
models,
|
|
|
|
|
allModels,
|
2025-07-24 17:10:08 +08:00
|
|
|
t
|
|
|
|
|
}) => {
|
|
|
|
|
const showSkeleton = useMinimumLoadingTime(loading);
|
|
|
|
|
|
|
|
|
|
if (showSkeleton) {
|
|
|
|
|
return (
|
2025-08-04 21:36:31 +08:00
|
|
|
<PricingVendorIntroSkeleton
|
|
|
|
|
isAllVendors={filterVendor === 'all'}
|
2025-07-24 17:10:08 +08:00
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
2025-08-04 21:36:31 +08:00
|
|
|
<PricingVendorIntro
|
|
|
|
|
filterVendor={filterVendor}
|
|
|
|
|
models={models}
|
|
|
|
|
allModels={allModels}
|
2025-07-24 17:10:08 +08:00
|
|
|
t={t}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2025-08-04 21:36:31 +08:00
|
|
|
export default PricingVendorIntroWithSkeleton;
|