mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix(util): remove unused function
This commit is contained in:
		
							parent
							
								
									920872512c
								
							
						
					
					
						commit
						4f49f8421c
					
				| @ -21,7 +21,7 @@ import { | ||||
|     Switch, | ||||
| } from 'react-mdl'; | ||||
| import { IconLink, shorten, styles as commonStyles } from '../common'; | ||||
| import { formatFullDateTime } from '../common/util'; | ||||
| import { formatFullDateTimeWithLocale } from '../common/util'; | ||||
| 
 | ||||
| class StatefulTextfield extends Component { | ||||
|     static propTypes = { | ||||
| @ -59,6 +59,7 @@ class ClientApplications extends PureComponent { | ||||
|         fetchApplication: PropTypes.func.isRequired, | ||||
|         appName: PropTypes.string, | ||||
|         application: PropTypes.object, | ||||
|         location: PropTypes.object, | ||||
|         storeApplicationMetaData: PropTypes.func.isRequired, | ||||
|     }; | ||||
| 
 | ||||
| @ -70,7 +71,9 @@ class ClientApplications extends PureComponent { | ||||
|     componentDidMount() { | ||||
|         this.props.fetchApplication(this.props.appName); | ||||
|     } | ||||
| 
 | ||||
|     formatFullDateTime(v) { | ||||
|         return formatFullDateTimeWithLocale(v, this.props.location.locale); | ||||
|     } | ||||
|     render() { | ||||
|         if (!this.props.application) { | ||||
|             return <ProgressBar indeterminate />; | ||||
| @ -142,7 +145,7 @@ class ClientApplications extends PureComponent { | ||||
|                                         icon="timeline" | ||||
|                                         subtitle={ | ||||
|                                             <span> | ||||
|                                                 {clientIp} last seen at <small>{formatFullDateTime(lastSeen)}</small> | ||||
|                                                 {clientIp} last seen at <small>{this.formatFullDateTime(lastSeen)}</small> | ||||
|                                             </span> | ||||
|                                         } | ||||
|                                     > | ||||
|  | ||||
| @ -4,11 +4,13 @@ import { fetchApplication, storeApplicationMetaData } from '../../store/applicat | ||||
| 
 | ||||
| const mapStateToProps = (state, props) => { | ||||
|     let application = state.applications.getIn(['apps', props.appName]); | ||||
|     const location = state.settings.toJS().location || {}; | ||||
|     if (application) { | ||||
|         application = application.toJS(); | ||||
|     } | ||||
|     return { | ||||
|         application, | ||||
|         location, | ||||
|     }; | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -26,5 +26,3 @@ export const formatFullDateTimeWithLocale = (v, locale) => { | ||||
|     dateTimeOptions.timeZone = found ? found.timezone : 'UTC'; | ||||
|     return new Date(v).toLocaleString(locale, dateTimeOptions); | ||||
| }; | ||||
| 
 | ||||
| export const formatFullDateTime = v => formatFullDateTimeWithLocale(v, 'nb-NO'); | ||||
|  | ||||
| @ -45,7 +45,7 @@ export default class MetricComponent extends React.Component { | ||||
|         this.props.fetchSeenApps(); | ||||
|         this.props.fetchFeatureMetrics(); | ||||
|     } | ||||
|     formatFulldateTime(v) { | ||||
|     formatFullDateTime(v) { | ||||
|         return formatFullDateTimeWithLocale(v, this.props.location.locale); | ||||
|     } | ||||
|     render() { | ||||
| @ -110,7 +110,7 @@ export default class MetricComponent extends React.Component { | ||||
|                             </div> | ||||
|                         )} | ||||
|                         <AppsLinkList apps={seenApps} /> | ||||
|                         <span>Created {this.formatFulldateTime(featureToggle.createdAt)}</span> | ||||
|                         <span>Created {this.formatFullDateTime(featureToggle.createdAt)}</span> | ||||
|                     </Cell> | ||||
|                 </Grid> | ||||
|                 <hr /> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user