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 }) => { | ||||
|      | ||||
|     console.log('this is ', providers) | ||||
|     const renderProvider = provider => ( | ||||
|         <ListItem key={provider.name}> | ||||
|             <ListItemAvatar>{getIcon(provider.name)}</ListItemAvatar> | ||||
|  | ||||
| @ -24,7 +24,7 @@ import useAddonsApi from '../../../../hooks/api/actions/useAddonsApi/useAddonsAp | ||||
| const ConfiguredAddons = ({ addons, hasAccess, getIcon }) => { | ||||
|     const { refetchAddons } = useAddons(); | ||||
|     const { updateAddon, removeAddon } = useAddonsApi(); | ||||
|     const { setToastData } = useToast(); | ||||
|     const { setToastData, setToastApiError } = useToast(); | ||||
| 
 | ||||
|     const toggleAddon = async addon => { | ||||
|         try { | ||||
| @ -36,11 +36,7 @@ const ConfiguredAddons = ({ addons, hasAccess, getIcon }) => { | ||||
|                 text: 'Addon state switched successfully', | ||||
|             }); | ||||
|         } catch (e) { | ||||
|             setToastData({ | ||||
|                 type: 'error', | ||||
|                 title: 'Error', | ||||
|                 text: 'Can not change addon state', | ||||
|             }); | ||||
|             setToastApiError(e.toString()); | ||||
|         } | ||||
|     }; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user