Merge branch 'develop' into tests-tests-tests

This commit is contained in:
William O'Beirne 2018-11-29 20:59:40 -05:00 committed by GitHub
commit 11d804d591
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 22 deletions

View File

@ -32,7 +32,7 @@ export default () =>
resolveWeb3(resolve, reject);
});
// If document has loaded already, try to get Web3 immediately.
if (document.readyState === `complete`) {
if (document.readyState !== `loading`) {
resolveWeb3(resolve, reject);
}
});

View File

@ -148,25 +148,6 @@ export function getCreateErrors(
errors.milestones = milestoneErrors;
}
}
// Team
if (team) {
let didTeamError = false;
const teamErrors = team.map(u => {
if (!u.displayName || !u.title || !u.emailAddress || !u.accountAddress) {
didTeamError = true;
return '';
}
const err = getCreateTeamMemberError(u);
didTeamError = didTeamError || !!err;
return err;
});
if (didTeamError) {
errors.team = teamErrors;
}
}
return errors;
}

View File

@ -13,7 +13,7 @@ import { signData } from 'modules/web3/actions';
export type TFetchProposals = typeof fetchProposals;
export function fetchProposals() {
return (dispatch: Dispatch<any>) => {
return async (dispatch: Dispatch<any>) => {
return dispatch({
type: types.PROPOSALS_DATA,
payload: async () => {

View File

@ -1,5 +1,5 @@
import { Store } from 'redux';
import { fetchProposal } from 'modules/proposals/actions';
import { fetchProposals, fetchProposal } from 'modules/proposals/actions';
import {
fetchUser,
fetchUserCreated,
@ -9,6 +9,12 @@ import {
import { extractProposalIdFromUrl } from 'utils/api';
const pathActions = [
{
matcher: /^\/proposals$/,
action: (_: RegExpMatchArray, store: Store) => {
return store.dispatch<any>(fetchProposals());
},
},
{
matcher: /^\/proposals\/(.+)$/,
action: (match: RegExpMatchArray, store: Store) => {