1- import React , { useEffect , useState , useCallback } from 'react' ;
1+ import { useEffect , useState , useCallback } from 'react' ;
22import { Switch } from '~/components/ui/Switch' ;
33import { useSettings } from '~/lib/hooks/useSettings' ;
44import { URL_CONFIGURABLE_PROVIDERS } from '~/lib/stores/settings' ;
@@ -8,12 +8,6 @@ import { motion } from 'framer-motion';
88import { classNames } from '~/utils/classNames' ;
99import { toast } from 'react-toastify' ;
1010import { providerBaseUrlEnvKeys } from '~/utils/constants' ;
11- import { SiAmazon , SiGoogle , SiHuggingface , SiPerplexity , SiOpenai } from 'react-icons/si' ;
12- import { BsRobot , BsCloud } from 'react-icons/bs' ;
13- import { TbBrain , TbCloudComputing } from 'react-icons/tb' ;
14- import { BiCodeBlock } from 'react-icons/bi' ;
15- import { FaCloud , FaBrain } from 'react-icons/fa' ;
16- import type { IconType } from 'react-icons' ;
1711
1812// Add type for provider names to ensure type safety
1913type ProviderName =
@@ -31,21 +25,20 @@ type ProviderName =
3125 | 'Together'
3226 | 'XAI' ;
3327
34- // Update the PROVIDER_ICONS type to use the ProviderName type
35- const PROVIDER_ICONS : Record < ProviderName , IconType > = {
36- AmazonBedrock : SiAmazon ,
37- Anthropic : FaBrain ,
38- Deepseek : BiCodeBlock ,
39- Google : SiGoogle ,
40- Groq : BsCloud ,
41- HuggingFace : SiHuggingface ,
42- Hyperbolic : TbCloudComputing ,
43- Mistral : TbBrain ,
44- OpenAI : SiOpenai ,
45- OpenRouter : FaCloud ,
46- Perplexity : SiPerplexity ,
47- Together : BsCloud ,
48- XAI : BsRobot ,
28+ const PROVIDER_ICONS : Record < ProviderName , string > = {
29+ AmazonBedrock : 'i-simple-icons:amazonaws' ,
30+ Anthropic : 'i-ph:brain' ,
31+ Deepseek : 'i-ph:code' ,
32+ Google : 'i-simple-icons:google' ,
33+ Groq : 'i-ph:cloud' ,
34+ HuggingFace : 'i-simple-icons:huggingface' ,
35+ Hyperbolic : 'i-ph:cloud-arrow-up' ,
36+ Mistral : 'i-ph:brain' ,
37+ OpenAI : 'i-simple-icons:openai' ,
38+ OpenRouter : 'i-ph:cloud' ,
39+ Perplexity : 'i-simple-icons:perplexity' ,
40+ Together : 'i-ph:cloud' ,
41+ XAI : 'i-ph:robot' ,
4942} ;
5043
5144// Update PROVIDER_DESCRIPTIONS to use the same type
@@ -145,7 +138,7 @@ const CloudProvidersTab = () => {
145138 'text-blue-500' ,
146139 ) }
147140 >
148- < TbCloudComputing className = "w-5 h-5" />
141+ < div className = "i-ph:cloud-arrow-up w-5 h-5" />
149142 </ div >
150143 < div >
151144 < h4 className = "text-md font-medium text-codinit-elements-textPrimary" > Cloud Providers</ h4 >
@@ -202,10 +195,13 @@ const CloudProvidersTab = () => {
202195 whileTap = { { scale : 0.9 } }
203196 >
204197 < div className = { classNames ( 'w-6 h-6' , 'transition-transform duration-200' , 'group-hover:rotate-12' ) } >
205- { React . createElement ( PROVIDER_ICONS [ provider . name as ProviderName ] || BsRobot , {
206- className : 'w-full h-full' ,
207- 'aria-label' : `${ provider . name } logo` ,
208- } ) }
198+ < div
199+ className = { classNames (
200+ PROVIDER_ICONS [ provider . name as ProviderName ] || 'i-ph:robot' ,
201+ 'w-full h-full' ,
202+ ) }
203+ aria-label = { `${ provider . name } logo` }
204+ />
209205 </ div >
210206 </ motion . div >
211207
0 commit comments