diff --git a/frontend/src/component/common/index.js b/frontend/src/component/common/index.js index 168fc27066..d5677371ee 100644 --- a/frontend/src/component/common/index.js +++ b/frontend/src/component/common/index.js @@ -1,7 +1,6 @@ const React = require('react'); const { List, ListItem, ListItemContent, - Grid, Cell, Button, Icon, Switch, } = require('react-mdl'); @@ -70,3 +69,13 @@ export const TogglesLinkList = ({ toggles }) => ( ))} ); + +export function getIcon (type) { + switch (type) { + case 'feature-updated': return 'autorenew'; + case 'feature-created': return 'add'; + case 'feature-deleted': return 'remove'; + case 'feature-archived': return 'archived'; + default: return 'star'; + } +}; diff --git a/frontend/src/component/feature/view-edit-container.jsx b/frontend/src/component/feature/view-edit-container.jsx index 9551ee28d4..111fdc96fe 100644 --- a/frontend/src/component/feature/view-edit-container.jsx +++ b/frontend/src/component/feature/view-edit-container.jsx @@ -10,9 +10,8 @@ import EditFeatureToggle from './form-edit-container.jsx'; import { fetchFeatureToggles, toggleFeature } from '../../store/feature-actions'; import { fetchFeatureMetrics, fetchSeenApps } from '../../store/feature-metrics-actions'; import { fetchHistoryForToggle } from '../../store/history-actions'; -import { getIcon } from '../history/history-item-diff'; -import { AppsLinkList, SwitchWithLabel } from '../common'; +import { AppsLinkList, SwitchWithLabel, getIcon } from '../common'; class EditFeatureToggleWrapper extends React.Component {