mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: cleanup based on PR feedback
This commit is contained in:
		
							parent
							
								
									6b605078df
								
							
						
					
					
						commit
						a4d2c62727
					
				| @ -14,7 +14,6 @@ import PropTypes from 'prop-types'; | |||||||
| 
 | 
 | ||||||
| const AvailableAddons = ({ providers, getIcon, hasAccess, history }) => { | const AvailableAddons = ({ providers, getIcon, hasAccess, history }) => { | ||||||
|      |      | ||||||
|     console.log('this is ', providers) |  | ||||||
|     const renderProvider = provider => ( |     const renderProvider = provider => ( | ||||||
|         <ListItem key={provider.name}> |         <ListItem key={provider.name}> | ||||||
|             <ListItemAvatar>{getIcon(provider.name)}</ListItemAvatar> |             <ListItemAvatar>{getIcon(provider.name)}</ListItemAvatar> | ||||||
|  | |||||||
| @ -24,7 +24,7 @@ import useAddonsApi from '../../../../hooks/api/actions/useAddonsApi/useAddonsAp | |||||||
| const ConfiguredAddons = ({ addons, hasAccess, getIcon }) => { | const ConfiguredAddons = ({ addons, hasAccess, getIcon }) => { | ||||||
|     const { refetchAddons } = useAddons(); |     const { refetchAddons } = useAddons(); | ||||||
|     const { updateAddon, removeAddon } = useAddonsApi(); |     const { updateAddon, removeAddon } = useAddonsApi(); | ||||||
|     const { setToastData } = useToast(); |     const { setToastData, setToastApiError } = useToast(); | ||||||
| 
 | 
 | ||||||
|     const toggleAddon = async addon => { |     const toggleAddon = async addon => { | ||||||
|         try { |         try { | ||||||
| @ -36,11 +36,7 @@ const ConfiguredAddons = ({ addons, hasAccess, getIcon }) => { | |||||||
|                 text: 'Addon state switched successfully', |                 text: 'Addon state switched successfully', | ||||||
|             }); |             }); | ||||||
|         } catch (e) { |         } catch (e) { | ||||||
|             setToastData({ |             setToastApiError(e.toString()); | ||||||
|                 type: 'error', |  | ||||||
|                 title: 'Error', |  | ||||||
|                 text: 'Can not change addon state', |  | ||||||
|             }); |  | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user