Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
GIST: {}, // Gist的详情
GISTS: [] // Gist列表
};
const middlewares = applyMiddleware(
logger(),
persist({ key: "[rz]", storage: localForage }, function(err, state) {
if (err) {
console.error(err);
} else {
store.setState(state);
}
})
);
const store = createStore(initialState, middlewares);
export default store;
FOLLOWERS: [], // 关注我的人
SHOW_CASES: [], // 项目展示
TODO: {}, // Todo详情
TODOS: [], // Todo列表
TODO_LABELS: [], // Todo的标签列表
REPO: {}, // 仓库详情
REPOS: [], // 仓库列表
POST: {}, // 文章详情
POSTS: [], // 文章列表
STACKOVERFLOW: {}, // 踩坑详情
STACKOVERFLOWS: [], // 踩坑列表
GIST: {}, // Gist的详情
GISTS: [] // Gist列表
};
const middlewares = applyMiddleware(
logger(),
persist({ key: "[rz]", storage: localForage }, function(err, state) {
if (err) {
console.error(err);
} else {
store.setState(state);
}
})
);
const store = createStore(initialState, middlewares);
export default store;
gdpr.toggleService();
}
const initialState: StoreType = {
gdpr: gdpr,
showModal: false,
showBanner: isFirstVisit,
locale,
messages,
// previous state list service for compare on save
prevListService: gdpr.getListServices(),
listService: gdpr.getListServices(),
isFirstVisit,
};
const store = createStore(initialState);
// if first visit detect click change page or action
if (isFirstVisit === true) {
listenClick(store);
}
// set global method for change setting cookie with click on link
global._gdpr_showModal = () => {
store.setState({showModal: true});
};
return store;
};
);
});
})()}
);
})}
);
}
}
export default connect(
state => ({
ORGS: state.ORGS,
REPO_STAT: state.REPO_STAT,
ORG_REPOS: state.ORG_REPOS
}),
actions
)(GithubOrganizations);
photoIndex: (photoIndex + images.length - 1) % images.length
})
}
onMoveNextRequest={() =>
this.setState({
photoIndex: (photoIndex + 1) % images.length
})
}
/>
) : null}
);
}
}
export default connect(
state => ({ SHOW_CASES: state.SHOW_CASES }),
actions
)(withRouter(Showcase));
style={{ fontSize: "1.6rem", marginRight: "0.5rem" }}
name="gist"
mega
/>
{gist.description}
);
})}
);
}
}
export default connect(
state => ({ GISTS: state.GISTS }),
actions
)(withRouter(Gists));
<p></p>
<ul>
{this.state.events
.filter(v => v)
.slice(0, 10)
.map((v, i) => {
return <li>{v}</li>;
})}
</ul>
);
}
}
export default connect(
state => ({
GISTS: state.GISTS,
REPOS: state.REPOS,
FOLLOWERS: state.FOLLOWERS
}),
actions
)(withRouter(Stat));
}
defaultCurrent={this.state.meta.page}
defaultPageSize={this.state.meta.per_page}
total={this.state.meta.total}
/>
) : (
""
)}
);
}
}
export default connect(
state => ({
POSTS: state.POSTS
}),
actions
)(withRouter(Posts));
type="default"
loading={this.state.loading}
onClick={() => this.getNextGistList()}
>
{this.state.loading ? "Loading" : "More"}
) : (
""
)}
);
}
}
export default connect(state => ({}), actions)(withRouter(Gists));
);
})}
);
})}
);
}
}
export default connect(
state => ({
TODOS: state.TODOS,
TODO_LABELS: state.TODO_LABELS
}),
actions
)(withRouter(TodoList));