renaming: loading to login

This commit is contained in:
Maren Süwer
2018-07-02 16:22:24 +02:00
parent e087920ba5
commit 69a081ccf8
5 changed files with 16 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ const styles = {
display: 'flex',
height: '10em'
},
loading: {
login: {
margin: 'auto',
textAlign: 'center'
}
@@ -24,7 +24,7 @@ class Login extends React.Component<Props> {
const { classes } = this.props;
return (
<div className={classes.wrapper}>
<div className={classes.loading}>
<div className={classes.login}>
You need to log in! ...
</div>
</div>

View File

@@ -7,7 +7,7 @@ import Login from '../Login';
type Props = {
loading: boolean,
login: boolean,
error: any,
repositories: any,
fetchRepositoriesIfNeeded: () => void
@@ -20,10 +20,10 @@ class Page extends React.Component<Props> {
}
render() {
const { loading, error, repositories } = this.props;
const { login, error, repositories } = this.props;
if(loading) {
if(login) {
return (
<div>
<h1>SCM</h1>
@@ -31,7 +31,7 @@ class Page extends React.Component<Props> {
</div>
);
}
else if(!loading){
else if(!login){
return (
<div>
<h1>SCM</h1>

View File

@@ -6,7 +6,7 @@ import { fetchRepositoriesIfNeeded } from '../modules/users';
import Login from '../Login';
type Props = {
loading: boolean,
login: boolean,
error: any,
repositories: any,
fetchRepositoriesIfNeeded: () => void
@@ -19,11 +19,11 @@ class Users extends React.Component<Props> {
}
render() {
const { loading, error, repositories } = this.props;
const { login, error, repositories } = this.props;
if(loading) {
if(login) {
return (
<div>
<h1>SCM</h1>
@@ -31,7 +31,7 @@ class Users extends React.Component<Props> {
</div>
);
}
else if(!loading){
else if(!login){
return (
<div>
<h1>SCM</h1>

View File

@@ -37,13 +37,13 @@ export default function reducer(state = {}, action = {}) {
case FETCH_REPOSITORIES:
return {
...state,
loading: true,
login: true,
error: null
};
case FETCH_REPOSITORIES_SUCCESS:
return {
...state,
loading: true,
login: true,
timestamp: action.timestamp,
error: null,
repositories: action.payload
@@ -51,7 +51,7 @@ export default function reducer(state = {}, action = {}) {
case FETCH_REPOSITORIES_FAILURE:
return {
...state,
loading: true,
login: true,
error: action.payload
};

View File

@@ -37,13 +37,13 @@ export default function reducer(state = {}, action = {}) {
case FETCH_REPOSITORIES:
return {
...state,
loading: true,
login: true,
error: null
};
case FETCH_REPOSITORIES_SUCCESS:
return {
...state,
loading: false,
login: false,
timestamp: action.timestamp,
error: null,
repositories: action.payload
@@ -51,7 +51,7 @@ export default function reducer(state = {}, action = {}) {
case FETCH_REPOSITORIES_FAILURE:
return {
...state,
loading: false,
login: false,
error: action.payload
};