Add prominent upgrade button when upgrade is pending

This commit is contained in:
Igor Gassmann 2017-11-10 11:55:34 -03:00
parent 2012fc17d4
commit 9e0f8adb58
2 changed files with 15 additions and 13 deletions

View file

@ -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 => ({

View file

@ -80,17 +80,18 @@ export const Header = props => {
title={__("Settings")}
/>
</div>
<rem>HEY I'M HER E</rem>
{upgradeSkipped
? <div className="header__item">
{upgradeSkipped ? (
<div className="header__item">
<Link
onClick={() => downloadUpgrade()}
button="primary button--flat"
icon="icon-upload"
icon="icon-arrow-up"
label={upgradeLabel}
/>
</div>
: ""}
) : (
""
)}
</header>
);
};