Add prominent upgrade button when upgrade is pending
This commit is contained in:
parent
2012fc17d4
commit
9e0f8adb58
2 changed files with 15 additions and 13 deletions
|
@ -1,6 +1,7 @@
|
|||
import React from "react";
|
||||
import { formatCredits } from "util/formatCredits";
|
||||
import { connect } from "react-redux";
|
||||
import { selectUpgradeSkipped } from "selectors/app";
|
||||
import {
|
||||
selectIsBackDisabled,
|
||||
selectIsForwardDisabled,
|
||||
|
@ -19,8 +20,8 @@ const select = state => ({
|
|||
isForwardDisabled: selectIsForwardDisabled(state),
|
||||
balance: formatCredits(selectBalance(state) || 0, 1),
|
||||
publish: __("Publish"),
|
||||
upgrade: __("Upgrade"),
|
||||
upgradeSkipped: true,
|
||||
upgradeLabel: __("Upgrade App"),
|
||||
upgradeSkipped: selectUpgradeSkipped(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
|
|
|
@ -80,17 +80,18 @@ export const Header = props => {
|
|||
title={__("Settings")}
|
||||
/>
|
||||
</div>
|
||||
<rem>HEY I'M HER E</rem>
|
||||
{upgradeSkipped
|
||||
? <div className="header__item">
|
||||
<Link
|
||||
onClick={() => downloadUpgrade()}
|
||||
button="primary button--flat"
|
||||
icon="icon-upload"
|
||||
label={upgradeLabel}
|
||||
/>
|
||||
</div>
|
||||
: ""}
|
||||
{upgradeSkipped ? (
|
||||
<div className="header__item">
|
||||
<Link
|
||||
onClick={() => downloadUpgrade()}
|
||||
button="primary button--flat"
|
||||
icon="icon-arrow-up"
|
||||
label={upgradeLabel}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</header>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue