Use prettier config file.

This commit is contained in:
Dylan Vann
2018-05-06 19:04:28 -04:00
parent 3e692b901d
commit b2fb48bbe3
21 changed files with 627 additions and 609 deletions
@@ -2,27 +2,27 @@ import React, { Component } from 'react'
import uuid from 'uuid/v4'
export default BaseComponent => {
class WithCacheBust extends Component {
state = { bust: '?bust' }
class WithCacheBust extends Component {
state = { bust: '?bust' }
onPressReload = () => {
// Force complete re-render and bust image cache.
const key = uuid()
const bust = `?bust=${key}`
this.setState({ bust })
onPressReload = () => {
// Force complete re-render and bust image cache.
const key = uuid()
const bust = `?bust=${key}`
this.setState({ bust })
}
render() {
return (
<BaseComponent
bust={this.state.bust}
onPressReload={this.onPressReload}
/>
)
}
}
render() {
return (
<BaseComponent
bust={this.state.bust}
onPressReload={this.onPressReload}
/>
)
}
}
WithCacheBust.displayName = `withCacheBust${BaseComponent.displayName}`
WithCacheBust.displayName = `withCacheBust${BaseComponent.displayName}`
return WithCacheBust
return WithCacheBust
}