Merge branch 'develop' into tests-tests-tests
This commit is contained in:
commit
11d804d591
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue