Skip to content

Commit

Permalink
feat(app): Enable new app update modal (#3044)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous authored Feb 13, 2019
1 parent c4a5f88 commit d36071e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 89 deletions.
72 changes: 0 additions & 72 deletions app/src/components/AppSettings/AppUpdateModal.js

This file was deleted.

3 changes: 0 additions & 3 deletions app/src/components/AppSettings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as React from 'react'
import {AnalyticsSettingsCard} from '../analytics-settings'
import AdvancedSettingsCard from './AdvancedSettingsCard'
import AppInfoCard from './AppInfoCard'
import AppUpdateModal from './AppUpdateModal'
import {CardContainer, CardRow} from '../layout'

type Props = {
Expand All @@ -31,5 +30,3 @@ export default function AppSettings (props: Props) {
</CardContainer>
)
}

export {AppUpdateModal}
16 changes: 2 additions & 14 deletions app/src/pages/More/AppSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
// view info about the app and update
import * as React from 'react'
import {connect} from 'react-redux'
import {getIn} from '@thi.ng/paths'
import {Route, Switch, Redirect, type ContextRouter} from 'react-router'
import {push} from 'react-router-redux'

import {getConfig} from '../../config'

import {
getShellUpdateState,
getAvailableShellUpdate,
Expand All @@ -18,7 +15,7 @@ import {
} from '../../shell'

import Page from '../../components/Page'
import AppSettings, {AppUpdateModal} from '../../components/AppSettings'
import AppSettings from '../../components/AppSettings'
import UpdateApp from '../../components/AppSettings/UpdateApp'
import {ErrorModal} from '../../components/modals'

Expand All @@ -30,7 +27,6 @@ type OP = ContextRouter
type SP = {
update: ShellUpdateState,
availableVersion: ?string,
__featureEnabled: boolean,
}

type DP = {
Expand All @@ -42,8 +38,6 @@ type DP = {

type Props = OP & SP & DP

const __FEATURE_FLAG = 'devInternal.newUpdateModal'

export default connect(
mapStateToProps,
mapDispatchToProps
Expand All @@ -56,7 +50,6 @@ function AppSettingsPage (props: Props) {
closeModal,
update: {available, seen, error},
match: {path},
__featureEnabled,
} = props

return (
Expand All @@ -72,11 +65,7 @@ function AppSettingsPage (props: Props) {
path={`${path}/update`}
render={() =>
!error ? (
__featureEnabled ? (
<UpdateApp {...props} />
) : (
<AppUpdateModal {...props} />
)
<UpdateApp {...props} />
) : (
<ErrorModal
heading="Update Error"
Expand All @@ -101,7 +90,6 @@ function mapStateToProps (state: State): SP {
return {
update: getShellUpdateState(state),
availableVersion: getAvailableShellUpdate(state),
__featureEnabled: !!getIn(getConfig(state), __FEATURE_FLAG),
}
}

Expand Down

0 comments on commit d36071e

Please sign in to comment.