diff --git a/js/api.js b/js/api.js
index aae8724..d178f70 100644
--- a/js/api.js
+++ b/js/api.js
@@ -38,7 +38,7 @@ const actiontypes_userinfo = {
const defaultstate_userinfo = {
isSignedIn : false,
- wasGreeted : true,
+ wasGreeted : false,
username : null,
error : false,
errorMessages : [],
@@ -261,7 +261,6 @@ const reducer_userinfo = (state = defaultstate_userinfo, action) => {
case actiontypes_userinfo.CLEAR:
return Object.assign({}, state, {
isSignedIn : false,
- wasGreeted : false,
username : null,
error : false,
errorMessages : [],
diff --git a/js/components/Navigation.js b/js/components/Navigation.js
index cc4b07a..a1bbb77 100644
--- a/js/components/Navigation.js
+++ b/js/components/Navigation.js
@@ -14,7 +14,7 @@ import { connect } from 'react-redux';
import React from 'react';
import {greet, logout} from '../api';
-import {notify} from 'react-notify-toast';
+import {notify} from "react-notify-toast";
export class TurniereNavigation extends React.Component {
@@ -70,12 +70,12 @@ class InvisibleLoginLogoutButtons extends React.Component {
render() {
const {isSignedIn, username, wasGreeted} = this.props;
- if(isSignedIn) {
- if (!wasGreeted) {
- notify.show('Willkommen, ' + username + '!', 'success', 2500);
- greet();
- }
+ if (isSignedIn && !wasGreeted) {
+ notify.show('Willkommen, ' + username + '!', 'success', 3000);
+ greet();
+ }
+ if(isSignedIn) {
return (
@@ -83,11 +83,6 @@ class InvisibleLoginLogoutButtons extends React.Component {
);
} else {
- if (!wasGreeted) {
- notify.show('Du bist jetzt abgemeldet!', 'success', 2500);
- greet();
- }
-
return (