Browse Source

Prettify again our code after prettier update

master
meriadec 7 years ago
parent
commit
304148071e
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 8
      src/components/AccountPage/EmptyStateAccount.js
  2. 8
      src/components/AccountPage/index.js
  3. 2
      src/components/Breadcrumb/index.js
  4. 8
      src/components/DashboardPage/EmptyState.js
  5. 36
      src/components/DashboardPage/index.js
  6. 2
      src/components/DeltaChange.js
  7. 11
      src/components/IsUnlocked.js
  8. 9
      src/components/MainSideBar.js
  9. 5
      src/components/ManagerPage/EnsureDevice.js
  10. 2
      src/components/ManagerPage/MemInfos.js
  11. 8
      src/components/Onboarding/index.js
  12. 5
      src/components/Onboarding/steps/Analytics.js
  13. 5
      src/components/Onboarding/steps/GenuineCheck.js
  14. 5
      src/components/Onboarding/steps/Init.js
  15. 5
      src/components/Onboarding/steps/SelectDevice.js
  16. 5
      src/components/RequestAmount/index.js
  17. 5
      src/components/SettingsPage/PasswordModal.js
  18. 8
      src/components/SettingsPage/index.js
  19. 5
      src/components/SettingsPage/sections/Profile.js
  20. 8
      src/components/UpdateNotifier.js
  21. 5
      src/components/base/Modal/index.js
  22. 5
      src/components/layout/Default.js
  23. 8
      src/components/modals/AccountSettingRenderBody.js
  24. 8
      src/components/modals/ImportAccounts/index.js
  25. 2
      src/helpers/SettingsDefaults.js

8
src/components/AccountPage/EmptyStateAccount.js

@ -54,4 +54,10 @@ class EmptyStateAccount extends PureComponent<Props, *> {
}
}
export default compose(connect(null, mapDispatchToProps), translate())(EmptyStateAccount)
export default compose(
connect(
null,
mapDispatchToProps,
),
translate(),
)(EmptyStateAccount)

8
src/components/AccountPage/index.js

@ -188,4 +188,10 @@ class AccountPage extends PureComponent<Props, State> {
}
}
export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(AccountPage)
export default compose(
connect(
mapStateToProps,
mapDispatchToProps,
),
translate(),
)(AccountPage)

2
src/components/Breadcrumb/index.js

@ -54,7 +54,7 @@ const Bar = styled.div`
}
`
const indexToPurcent = (index, itemsLength) => 100 - 100 / (itemsLength - 1) * parseInt(index, 10)
const indexToPurcent = (index, itemsLength) => 100 - (100 / (itemsLength - 1)) * parseInt(index, 10)
type Props = {
currentStep: number | string,

8
src/components/DashboardPage/EmptyState.js

@ -77,4 +77,10 @@ export const Description = styled(Box).attrs({
})`
margin: 10px auto 25px;
`
export default compose(connect(null, mapDispatchToProps), translate())(EmptyState)
export default compose(
connect(
null,
mapDispatchToProps,
),
translate(),
)(EmptyState)

36
src/components/DashboardPage/index.js

@ -148,19 +148,21 @@ class DashboardPage extends PureComponent<Props, State> {
alignItems="center"
style={{ margin: '0 -16px' }}
>
{accounts.concat(Array(3 - accounts.length % 3).fill(null)).map((account, i) => (
<Box key={account ? account.id : `placeholder_${i}`} flex="33%" p={16}>
{account ? (
<AccountCard
key={account.id}
counterValue={counterValue}
account={account}
daysCount={daysCount}
onClick={this.onAccountClick}
/>
) : null}
</Box>
))}
{accounts
.concat(Array(3 - (accounts.length % 3)).fill(null))
.map((account, i) => (
<Box key={account ? account.id : `placeholder_${i}`} flex="33%" p={16}>
{account ? (
<AccountCard
key={account.id}
counterValue={counterValue}
account={account}
daysCount={daysCount}
onClick={this.onAccountClick}
/>
) : null}
</Box>
))}
</Box>
</Box>
{displayOperations && (
@ -182,4 +184,10 @@ class DashboardPage extends PureComponent<Props, State> {
}
}
export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(DashboardPage)
export default compose(
connect(
mapStateToProps,
mapDispatchToProps,
),
translate(),
)(DashboardPage)

2
src/components/DeltaChange.js

@ -8,7 +8,7 @@ class DeltaChange extends PureComponent<{
}> {
render() {
const { from, to, ...rest } = this.props
const val = from ? Math.floor((to - from) / from * 100) : 0
const val = from ? Math.floor(((to - from) / from) * 100) : 0
// TODO in future, we also want to diverge rendering when the % is way too high (this can easily happen)
return <FormattedVal isPercent val={val} {...rest} />
}

11
src/components/IsUnlocked.js

@ -169,8 +169,13 @@ class IsUnlocked extends Component<Props, State> {
}
export default compose(
connect(mapStateToProps, mapDispatchToProps, null, {
pure: false,
}),
connect(
mapStateToProps,
mapDispatchToProps,
null,
{
pure: false,
},
),
translate(),
)(IsUnlocked)

9
src/components/MainSideBar.js

@ -169,5 +169,12 @@ const PlusWrapper = styled(Tabbable).attrs({
}
`
const decorate = compose(withRouter, translate(), connect(mapStateToProps, mapDispatchToProps))
const decorate = compose(
withRouter,
translate(),
connect(
mapStateToProps,
mapDispatchToProps,
),
)
export default decorate(MainSideBar)

5
src/components/ManagerPage/EnsureDevice.js

@ -33,4 +33,7 @@ class EnsureDevice extends PureComponent<Props, State> {
}
}
export default compose(translate(), connect(mapStateToProps))(EnsureDevice)
export default compose(
translate(),
connect(mapStateToProps),
)(EnsureDevice)

2
src/components/ManagerPage/MemInfos.js

@ -29,7 +29,7 @@ const Step = styled(Box).attrs({
export default function MemInfos(props: { memoryInfos: MemoryInfos }) {
const { memoryInfos: infos } = props
const totalSize = infos.applicationsSize + infos.systemSize
const appPercent = infos.applicationsSize * 100 / totalSize
const appPercent = (infos.applicationsSize * 100) / totalSize
return (
<Container>
<Step c="wallet" percent={appPercent}>{`${Math.round(

8
src/components/Onboarding/index.js

@ -156,4 +156,10 @@ const Container = styled(Box).attrs({
const StepContainer = styled(Box).attrs({
p: 40,
})``
export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(Onboarding)
export default compose(
connect(
mapStateToProps,
mapDispatchToProps,
),
translate(),
)(Onboarding)

5
src/components/Onboarding/steps/Analytics.js

@ -99,7 +99,10 @@ class Analytics extends PureComponent<StepProps, State> {
}
}
export default connect(null, mapDispatchToProps)(Analytics)
export default connect(
null,
mapDispatchToProps,
)(Analytics)
export const AnalyticsText = styled(Box).attrs({
ff: 'Open Sans|Regular',

5
src/components/Onboarding/steps/GenuineCheck.js

@ -204,7 +204,10 @@ class GenuineCheck extends PureComponent<StepProps, State> {
}
}
export default connect(null, mapDispatchToProps)(GenuineCheck)
export default connect(
null,
mapDispatchToProps,
)(GenuineCheck)
// TODO extract to a separate file
export function GenuineCheckFail({

5
src/components/Onboarding/steps/Init.js

@ -81,7 +81,10 @@ class Init extends PureComponent<StepProps, *> {
}
}
export default connect(null, mapDispatchToProps)(Init)
export default connect(
null,
mapDispatchToProps,
)(Init)
type CardType = {
icon: any,

5
src/components/Onboarding/steps/SelectDevice.js

@ -61,7 +61,10 @@ class SelectDevice extends PureComponent<StepProps, {}> {
}
}
export default connect(null, mapDispatchToProps)(SelectDevice)
export default connect(
null,
mapDispatchToProps,
)(SelectDevice)
const DeviceContainer = styled(Box).attrs({
alignItems: 'center',

5
src/components/RequestAmount/index.js

@ -179,4 +179,7 @@ export class RequestAmount extends PureComponent<Props> {
}
}
export default compose(connect(mapStateToProps), translate())(RequestAmount)
export default compose(
connect(mapStateToProps),
translate(),
)(RequestAmount)

5
src/components/SettingsPage/PasswordModal.js

@ -151,4 +151,7 @@ class PasswordModal extends PureComponent<Props, State> {
}
}
export default connect(null, mapDispatchToProps)(PasswordModal)
export default connect(
null,
mapDispatchToProps,
)(PasswordModal)

8
src/components/SettingsPage/index.js

@ -130,4 +130,10 @@ class SettingsPage extends PureComponent<Props, State> {
}
}
export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(SettingsPage)
export default compose(
connect(
mapStateToProps,
mapDispatchToProps,
),
translate(),
)(SettingsPage)

5
src/components/SettingsPage/sections/Profile.js

@ -212,4 +212,7 @@ class TabProfile extends PureComponent<Props, State> {
}
}
export default connect(null, mapDispatchToProps)(TabProfile)
export default connect(
null,
mapDispatchToProps,
)(TabProfile)

8
src/components/UpdateNotifier.js

@ -90,4 +90,10 @@ class UpdateNotifier extends PureComponent<Props> {
}
}
export default compose(connect(mapStateToProps, null), translate())(UpdateNotifier)
export default compose(
connect(
mapStateToProps,
null,
),
translate(),
)(UpdateNotifier)

5
src/components/base/Modal/index.js

@ -204,4 +204,7 @@ export const ModalContent = styled(Box).attrs({
pb: 5,
})``
export default connect(mapStateToProps, mapDispatchToProps)(Modal)
export default connect(
mapStateToProps,
mapDispatchToProps,
)(Modal)

5
src/components/layout/Default.js

@ -101,4 +101,7 @@ class Default extends Component<Props> {
}
}
export default compose(withRouter, translate())(Default)
export default compose(
withRouter,
translate(),
)(Default)

8
src/components/modals/AccountSettingRenderBody.js

@ -198,7 +198,13 @@ class HelperComp extends PureComponent<Props, State> {
}
}
export default compose(connect(null, mapDispatchToProps), translate())(HelperComp)
export default compose(
connect(
null,
mapDispatchToProps,
),
translate(),
)(HelperComp)
export function InputLeft({ currency }: { currency: Currency }) {
return (

8
src/components/modals/ImportAccounts/index.js

@ -218,7 +218,13 @@ class ImportAccounts extends PureComponent<Props, State> {
}
}
export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(ImportAccounts)
export default compose(
connect(
mapStateToProps,
mapDispatchToProps,
),
translate(),
)(ImportAccounts)
function idleCallback() {
return new Promise(resolve => window.requestIdleCallback(resolve))

2
src/helpers/SettingsDefaults.js

@ -15,7 +15,7 @@ export const currencySettingsDefaults = ({
}: CryptoCurrency): ConfirmationDefaults => {
let confirmationsNb
if (blockAvgTime) {
const def = Math.ceil(30 * 60 / blockAvgTime) // 30 min approx validation
const def = Math.ceil((30 * 60) / blockAvgTime) // 30 min approx validation
confirmationsNb = { min: 1, def, max: 2 * def }
}
return {

Loading…
Cancel
Save