/* eslint-disable default-case */ import React, { Component } from 'react'; import history from '../history' import Authenticate from './authenticate' import { Notify } from 'zent'; import userUtil from '../../libs/userUtil' import UserIe from '../../interface/UserIe' class AuthController extends Component{ authenticate:Authenticate; user:UserIe.UserObjIe; constructor(){ super({}); this.authenticate=new Authenticate(); this.user=userUtil.getUser(); } componentDidMount(){ } componentWillUnmount(){ } signOut(){ Notify.success("ιεΊζε") this.authenticate.signout(history.replace('/login')); this.forceUpdate(); } render(){ return this.authenticate.isAuthenticated ? (
Welcome!{this.user.userName}
) : (You are not logged in.
); } } export default AuthController;