unreadInboxCount: number;
unreadReportCount: number;
unreadApplicationCount: number;
- searchParam: string;
showDropdown: boolean;
onSiteBanner?(url: string): any;
}
unreadReportCount: 0,
unreadApplicationCount: 0,
expanded: false,
- searchParam: "",
showDropdown: false,
};
subscription: any;
this.unreadApplicationCountSub.unsubscribe();
}
- updateUrl() {
- const searchParam = this.state.searchParam;
- this.setState({ searchParam: "" });
- this.setState({ showDropdown: false, expanded: false });
- if (searchParam === "") {
- this.context.router.history.push(`/search/`);
- } else {
- const searchParamEncoded = encodeURIComponent(searchParam);
- this.context.router.history.push(
- `/search/q/${searchParamEncoded}/type/All/sort/TopAll/listing_type/All/community_id/0/creator_id/0/page/1`
- );
- }
- }
-
render() {
return this.navbar();
}
className="p-1 navbar-toggler nav-link border-0"
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("unread_messages", {
- count: this.state.unreadInboxCount,
+ count: Number(this.state.unreadInboxCount),
formattedCount: numToSI(this.state.unreadInboxCount),
})}
>
className="p-1 navbar-toggler nav-link border-0"
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("unread_reports", {
- count: this.state.unreadReportCount,
+ count: Number(this.state.unreadReportCount),
formattedCount: numToSI(this.state.unreadReportCount),
})}
>
className="p-1 navbar-toggler nav-link border-0"
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("unread_registration_applications", {
- count: this.state.unreadApplicationCount,
+ count: Number(this.state.unreadApplicationCount),
formattedCount: numToSI(
this.state.unreadApplicationCount
),
to="/inbox"
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("unread_messages", {
- count: this.state.unreadInboxCount,
+ count: Number(this.state.unreadInboxCount),
formattedCount: numToSI(this.state.unreadInboxCount),
})}
>
to="/reports"
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("unread_reports", {
- count: this.state.unreadReportCount,
+ count: Number(this.state.unreadReportCount),
formattedCount: numToSI(this.state.unreadReportCount),
})}
>
className="nav-link"
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("unread_registration_applications", {
- count: this.state.unreadApplicationCount,
+ count: Number(this.state.unreadApplicationCount),
formattedCount: numToSI(
this.state.unreadApplicationCount
),
i.setState({ expanded: false, showDropdown: false });
}
- handleSearchParam(i: Navbar, event: any) {
- i.setState({ searchParam: event.target.value });
- }
-
handleLogoutClick(i: Navbar) {
i.setState({ showDropdown: false, expanded: false });
UserService.Instance.logout();