const ProtectedComponent = ({ Component, path }) => { switch (this.state.token) { case '': return case 'UNAUTHORIZED': return default: return } }