This commit is contained in:
Kiril Peyanski 2018-10-24 09:29:12 +03:00
Родитель 6b0717cd8f
Коммит ee2dc08182
6 изменённых файлов: 16 добавлений и 14 удалений

Просмотреть файл

@ -1 +0,0 @@
REACT_APP_PUBLIC_URL=""

Просмотреть файл

@ -1 +0,0 @@
REACT_APP_PUBLIC_URL="/kendo-react-material-dashboard"

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "kendo-react-material-dashboard",
"version": "0.1.0",
"private": true,
"private": false,
"dependencies": {
"@material-ui/core": "^3.2.0",
"@progress/kendo-data-query": "^1.5.0",
@ -53,6 +53,7 @@
"eslint-plugin-react": "7.11.1",
"file-loader": "2.0.0",
"fs-extra": "7.0.0",
"gh-pages": "^2.0.1",
"html-webpack-plugin": "4.0.0-alpha.2",
"identity-obj-proxy": "3.0.0",
"jest": "23.6.0",
@ -83,7 +84,9 @@
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js"
"test": "node scripts/test.js",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
"eslintConfig": {
"extends": "react-app"
@ -134,5 +137,6 @@
"presets": [
"react-app"
]
}
}
},
"homepage": "http://telerik.github.io/kendo-react-material-dashboard"
}

Просмотреть файл

@ -58,7 +58,7 @@ class MainMenu extends Component {
</div>
</div>)}
<div className={'content-wrapper col'}>
<Redirect from="/" to="dashboard" />
<Redirect from="*" to="/dashboard" />
<Route path="/dashboard" component={Dashboard} />
<Route path="/issues" component={IssuesIndex} />
<Route path="/profile" component={withGithubApi(withGithubUser(Profile))} />

Просмотреть файл

@ -7,6 +7,9 @@ class Dashboard extends Component {
login = () => {
this.props.history.push('dashboard');
}
handleClick = (event) => {
event.preventDefault();
}
render() {
return (
<div id="login" className="justify-content-center">
@ -25,7 +28,7 @@ class Dashboard extends Component {
<InputLabel>Password</InputLabel>
<Input type="password" className="form-control" />
<p className="text-xs-right small">
<a>Forgot it?</a>
<a href="/" onClick={this.handleClick}>Forgot it?</a>
</p>
</div>
<div className="form-group mb-0 text-right">

Просмотреть файл

@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom'
import { HashRouter } from 'react-router-dom'
import { withRouter } from 'react-router-dom';
import App from './App.jsx';
import { Ripple } from '@progress/kendo-react-ripple';
@ -12,15 +12,12 @@ import { Provider } from "react-redux";
const AppWithRouting = withRouter(App);
console.log(process.env.REACT_APP_PUBLIC_URL);
ReactDOM.render((
<Provider store={issuesStore}>
<Ripple>
<BrowserRouter basename={process.env.REACT_APP_PUBLIC_URL}>
<HashRouter>
<AppWithRouting />
</BrowserRouter>
</HashRouter>
</Ripple>
</Provider>
),