Misc bugs & cleanup (#173)

* fix Final.create getting called multiple times

* give moment the non-standard format string to parse with

* remove unused package & refs for nprogress

* remove unused file: theme.ts
This commit is contained in:
AMStrix 2018-11-02 10:47:25 -05:00 committed by William O'Beirne
parent 7c651be138
commit f823488abb
8 changed files with 3 additions and 70 deletions

View File

@ -159,7 +159,7 @@ const MilestoneFields = ({
<DatePicker.MonthPicker
style={{ flex: 1, marginRight: '0.5rem' }}
placeholder="Expected completion date"
value={milestone.date ? moment(milestone.date) : undefined}
value={milestone.date ? moment(milestone.date, 'MMMM YYYY') : undefined}
format="MMMM YYYY"
allowClear={false}
onChange={(_, date) => onChange(index, { ...milestone, date })}

View File

@ -197,7 +197,7 @@ const ReviewMilestones = ({
<div className="ReviewMilestone">
<div className="ReviewMilestone-title">{m.title}</div>
<div className="ReviewMilestone-info">
{moment(m.date).format('MMMM YYYY')}
{moment(m.date, 'MMMM YYYY').format('MMMM YYYY')}
{' '}
{m.payoutPercent}% of funds
</div>

View File

@ -164,7 +164,7 @@ class CreateFlow extends React.Component<Props, State> {
const { isFetchingDraft, isSavingDraft, hasFetchedDraft } = this.props;
const { step, isPreviewing, isPublishing } = this.state;
if (isFetchingDraft) {
if (isFetchingDraft && !isPublishing) {
return (
<div className="CreateFlow-loading">
<Spin size="large" />

View File

@ -1,18 +0,0 @@
export default {
colors: {
primary: 'royalblue',
secondary: 'teal',
text: 'black',
},
fontSize: {
xl: '2.4rem',
lg: '1.8rem',
md: '1.3rem',
nm: '1rem',
sm: '0.75rem',
},
screen: {
medium: '900px',
mobile: '600px',
},
};

View File

@ -1,38 +0,0 @@
/* Make clicks pass-through */
#nprogress {
pointer-events: none;
}
#nprogress .bar {
background: #1585FF;
position: fixed;
z-index: 1031;
top: 0;
left: 0;
width: 100%;
height: 3px;
}
/* Fancy blur effect */
#nprogress .peg {
display: block;
position: absolute;
right: 0px;
width: 100px;
height: 100%;
box-shadow: 0 0 10px #fbd281, 0 0 5px #0a0600;
opacity: 1;
transform: rotate(3deg) translate(0px, -4px);
}
.nprogress-custom-parent {
overflow: hidden;
position: relative;
}
.nprogress-custom-parent #nprogress .bar {
position: absolute;
}

View File

@ -5,7 +5,6 @@
@import 'variables.less';
@import '~font-awesome/css/font-awesome.min.css';
@import './_nprogress.css';
@import 'fonts.less';
@import 'react-mde-overrides.less';
@import 'antd-overrides.less';

View File

@ -50,7 +50,6 @@
"@types/jwt-decode": "^2.2.1",
"@types/lodash": "^4.14.112",
"@types/node": "^10.3.1",
"@types/nprogress": "0.0.29",
"@types/numeral": "^0.0.25",
"@types/react": "16.4.18",
"@types/react-dom": "16.0.9",
@ -108,7 +107,6 @@
"moment": "^2.22.2",
"node-sass": "^4.9.2",
"nodemon": "^1.18.4",
"nprogress": "^0.2.0",
"prettier": "^1.13.4",
"prettier-package-json": "^1.6.0",
"query-string": "6.1.0",

View File

@ -1922,10 +1922,6 @@
version "10.7.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.7.1.tgz#b704d7c259aa40ee052eec678758a68d07132a2e"
"@types/nprogress@0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/nprogress/-/nprogress-0.0.29.tgz#060bd510022a005f1840234030d3132fb9195471"
"@types/numeral@^0.0.25":
version "0.0.25"
resolved "https://registry.yarnpkg.com/@types/numeral/-/numeral-0.0.25.tgz#b6f55062827a4787fe4ab151cf3412a468e65271"
@ -10618,10 +10614,6 @@ npm@^6.1.0:
gauge "~2.7.3"
set-blocking "~2.0.0"
nprogress@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/nprogress/-/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1"
nth-check@^1.0.1, nth-check@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4"