(props: AppProviderProps)
| 47 | token: TokenInterface; |
| 48 | |
| 49 | constructor(props: AppProviderProps) { |
| 50 | super(props); |
| 51 | this.token = props.token != null ? props.token : new Token(); |
| 52 | this.state = { |
| 53 | api: new Api(new Token()), |
| 54 | jwt: { |
| 55 | decoded: this.token.getDecoded(), |
| 56 | auth_token: this.token.getString() |
| 57 | }, |
| 58 | userInfo: null, |
| 59 | categories: [], |
| 60 | setAuthToken: this.setAuthToken, |
| 61 | fetchUser: this.fetchUser, |
| 62 | logout: this.logout |
| 63 | }; |
| 64 | } |
| 65 | |
| 66 | componentDidMount() { |
| 67 | if (this.state.jwt.auth_token.length > 0) { |
nothing calls this directly
no test coverage detected