refactor: filter providers by file type instead of subscription info

This commit is contained in:
ezequielnick 2025-02-08 03:09:24 +08:00
parent a187bc7362
commit d28d33849c

View File

@ -50,6 +50,16 @@ const ProxyProvider: React.FC = () => {
const providers = useMemo(() => {
if (!data) return []
return Object.values(data.providers)
.map(provider => {
if (provider.vehicleType === 'Inline' || provider.vehicleType === 'File') {
return {
...provider,
subscriptionInfo: null
}
}
return provider
})
.filter(provider => 'subscriptionInfo' in provider)
.sort((a, b) => {
if (a.vehicleType === 'File' && b.vehicleType !== 'File') {