mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-21 22:27:11 +00:00
Redirect inbox to login. Fixes #105
This commit is contained in:
parent
a0c045b2fb
commit
edcaf00486
|
@ -87,6 +87,11 @@ export class Inbox extends Component<any, InboxState> {
|
|||
this.state = this.emptyState;
|
||||
this.handleSortChange = this.handleSortChange.bind(this);
|
||||
|
||||
if (!UserService.Instance.user && isBrowser()) {
|
||||
toast(i18n.t('not_logged_in'), 'danger');
|
||||
this.context.router.history.push(`/login`);
|
||||
}
|
||||
|
||||
this.parseMessage = this.parseMessage.bind(this);
|
||||
this.subscription = wsSubscribe(this.parseMessage);
|
||||
|
||||
|
|
Loading…
Reference in a new issue