From edcaf00486de704129170e71bdeacc93a627d245 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 15 Dec 2020 18:43:35 -0500 Subject: [PATCH] Redirect inbox to login. Fixes #105 --- src/shared/components/inbox.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/shared/components/inbox.tsx b/src/shared/components/inbox.tsx index 70feb4be..04eb0431 100644 --- a/src/shared/components/inbox.tsx +++ b/src/shared/components/inbox.tsx @@ -87,6 +87,11 @@ export class Inbox extends Component { 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);