mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 06:36:17 +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.state = this.emptyState;
|
||||||
this.handleSortChange = this.handleSortChange.bind(this);
|
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.parseMessage = this.parseMessage.bind(this);
|
||||||
this.subscription = wsSubscribe(this.parseMessage);
|
this.subscription = wsSubscribe(this.parseMessage);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue