Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 760b970

Browse files
Hashroute add
1 parent b38a276 commit 760b970

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

‎package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "js.zonayed.me",
2+
"name": "test.zonayed.me",
33
"version": "0.1.0",
4-
"homepage": "https://js.zonayed.me",
4+
"homepage": "https://test.zonayed.me",
55
"private": true,
66
"dependencies": {
77
"axios": "^0.18.0",

‎src/App.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import { BrowserRouterasRouter, Route } from 'react-router-dom';
2+
import { HashRouter, Route } from 'react-router-dom';
33
import axios from 'axios';
44

55
import Header from './component/Header';
@@ -32,14 +32,14 @@ export default class App extends Component {
3232

3333
render() {
3434
return (
35-
<Router>
35+
<HashRouter>
3636
<div className="App">
3737
<Header />
3838
<Route exact path="/" render={() => <Main data={this.state} />} />
3939
<Route exact path="/:topic/:id" render={(props) => <SingleContent {...props} />} />
4040
<Footer />
4141
</div>
42-
</Router>
42+
</HashRouter>
4343
);
4444
}
4545
}

‎src/component/Header.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import logo from '../logo.png';
44

55
export default class Footer extends PureComponent {
66
render() {
7-
console.log('Header');
87
return (
98
<header className="logo-area">
109
<img src={logo} alt="Learn JavaScript" />

‎src/component/SingleContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default class SingleContent extends Component {
1313

1414
componentWillMount() {
1515
const { props: { match: { params: { id } } } } = this;
16-
axios(`http://with.zonayed.me/wp-json/wp/v2/posts/${id}`).then(({data}) => this.setState({data, shouldUpdate: false}));
16+
axios(`https://with.zonayed.me/wp-json/wp/v2/posts/${id}`).then(({data}) => this.setState({data, shouldUpdate: false}));
1717
toTop();
1818
}
1919

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /