Skip to content

Commit 9b13260

Browse files
author
SwMobile Apple
committed
Make it works on my build env
1 parent 0e3b433 commit 9b13260

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

index.html

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
1-
<div class="app-container" id="example">正在载入中...</div>
1+
<div class="app-container" id="example">正在载入中...loading</div>
22
<script src="./dist/js/main.js"></script>
3-
<!-- Global Site Tag (gtag.js) - Google Analytics -->
4-
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-73786601-3"></script>
5-
<script>
6-
window.dataLayer = window.dataLayer || [];
7-
function gtag(){dataLayer.push(arguments)};
8-
gtag('js', new Date())
9-
10-
gtag('config', 'UA-73786601-3');
11-
</script>

src/js/actions/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ function shouldFetchIssues(state) {
2424
return !state.items.length;
2525
}
2626

27-
export function fetchIssuesIfNeeded() {
27+
export default function fetchIssuesIfNeeded() {
28+
// function fetchIssuesIfNeeded() {
2829
return (dispatch, getState) => {
2930
if (shouldFetchIssues(getState())) {
3031
return dispatch(fetchIssues());

src/js/components/archive/archive.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import { Row, Col } from 'antd';
44
import { connect } from 'react-redux';
5-
import { fetchIssuesIfNeeded } from '../../actions/index';
5+
// import { fetchIssuesIfNeeded } from '../../actions/index';
6+
import fetchIssuesIfNeeded from '../../actions/index';
67
import ArchiveList from './archivelist';
78
import YearCard from './yearcard';
89
import '../../../css/archive/archive.css';

src/js/components/article/navigation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ export default class Navigation extends React.Component {
1616
const menu = [];
1717
const patt = /(#+)\s+?(.+)/g;
1818
let result = null;
19-
while ((result = patt.exec(issues))) {
19+
result = patt.exec(issues);
20+
while (result) {
2021
menu.push({ level: result[1].length, title: result[2] });
22+
result = patt.exec(issues);
2123
}
2224
const menuObj = [];
2325
let level2Temp = null;

src/js/components/blog/blogindex.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import { Row, Col } from 'antd';
44
import { connect } from 'react-redux';
5-
import { fetchIssuesIfNeeded } from '../../actions/index';
5+
// import { fetchIssuesIfNeeded } from '../../actions/index';
6+
import fetchIssuesIfNeeded from '../../actions/index';
67
import ArticleArea from './articlearea';
78
import RightSider from './rightsider';
89

src/js/components/category/category.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import { Row, Col } from 'antd';
44
import { connect } from 'react-redux';
5-
import { fetchIssuesIfNeeded } from '../../actions/index';
5+
// import { fetchIssuesIfNeeded } from '../../actions/index';
6+
import fetchIssuesIfNeeded from '../../actions/index';
67
import ArticleList from './articlelist';
78
import CategoryCard from './categorycard';
89
import '../../../css/archive/archive.css';

src/js/components/tag/tag.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import { Row, Col } from 'antd';
44
import { connect } from 'react-redux';
5-
import { fetchIssuesIfNeeded } from '../../actions/index';
5+
// import { fetchIssuesIfNeeded } from '../../actions/index';
6+
import fetchIssuesIfNeeded from '../../actions/index';
67
import ArticleList from './articlelist';
78
import TagCard from './tagcard';
89
import '../../../css/archive/archive.css';

0 commit comments

Comments
 (0)