mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
notifications: added profile indicator
This commit is contained in:
parent
97590d88af
commit
dc90f2505c
10 changed files with 127 additions and 37 deletions
|
@ -13,6 +13,7 @@ import { ProfileStats } from '~/containers/profile/ProfileStats';
|
|||
import { ThemeSwitcher } from '~/containers/settings/ThemeSwitcher';
|
||||
import { useAuth } from '~/hooks/auth/useAuth';
|
||||
import markdown from '~/styles/common/markdown.module.scss';
|
||||
import { useNotifications } from '~/utils/providers/NotificationProvider';
|
||||
|
||||
import { ProfileSidebarLogoutButton } from '../ProfileSidebarLogoutButton';
|
||||
import { ProfileToggles } from '../ProfileToggles';
|
||||
|
@ -26,6 +27,7 @@ interface ProfileSidebarMenuProps {
|
|||
const ProfileSidebarMenu: VFC<ProfileSidebarMenuProps> = ({ onClose }) => {
|
||||
const { logout } = useAuth();
|
||||
const { setActiveTab } = useStackContext();
|
||||
const { hasNew } = useNotifications();
|
||||
|
||||
const onLogout = useCallback(() => {
|
||||
logout();
|
||||
|
@ -46,7 +48,10 @@ const ProfileSidebarMenu: VFC<ProfileSidebarMenuProps> = ({ onClose }) => {
|
|||
</VerticalMenu.Item>
|
||||
|
||||
<Superpower>
|
||||
<VerticalMenu.Item onClick={() => setActiveTab(1)}>
|
||||
<VerticalMenu.Item
|
||||
onClick={() => setActiveTab(1)}
|
||||
hasUpdates={hasNew}
|
||||
>
|
||||
Уведомления
|
||||
</VerticalMenu.Item>
|
||||
</Superpower>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue